From: Christoph Hellwig <hch@infradead.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: Alex Lyakas <alex@zadara.com>, linux-block@vger.kernel.org
Subject: Re: [PATCH] block: preserve BIO_REFFED flag in bio_reset()
Date: Sun, 7 Apr 2019 00:56:51 -0700 [thread overview]
Message-ID: <20190407075651.GA23397@infradead.org> (raw)
In-Reply-To: <ae3ac0dc-92ef-36f9-ff0d-ef41e6deacb1@kernel.dk>
On Sat, Apr 06, 2019 at 12:58:54PM -0600, Jens Axboe wrote:
> On 4/6/19 7:03 AM, Alex Lyakas wrote:
> > Commit dac56212e8127dbc0bff7be35c508bc280213309 titled
> > "bio: skip atomic inc/dec of ->bi_cnt for most use cases"
> > made __bi_cnt dependent on the new BIO_REFFED flag.
> >
> > bio_reset() does not reset __bi_cnt, but it does reset the BIO_REFFED flag.
> > But __bi_cnt depends now on the BIO_REFFED flag, so bio_reset()
> > needs to preserve this flag.
>
> Looks good to me, applied, thanks.
Uh-oh. While this fix isn't wrong per se I think it is confusing and
set a dnagerous precedence.
We have BIO_RESET_BITS to indicate which flags survive. So any flag
that is supposed to survive the reset should be be added to that
instead of specifically worked around.
next prev parent reply other threads:[~2019-04-07 7:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-06 13:03 [PATCH] block: preserve BIO_REFFED flag in bio_reset() Alex Lyakas
2019-04-06 18:58 ` Jens Axboe
2019-04-07 7:42 ` Alex Lyakas
2019-04-07 7:56 ` Christoph Hellwig [this message]
2019-04-07 14:35 ` Alex Lyakas
2019-04-08 6:30 ` Christoph Hellwig
2019-05-13 8:08 ` Christoph Hellwig
2019-04-07 19:38 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190407075651.GA23397@infradead.org \
--to=hch@infradead.org \
--cc=alex@zadara.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).