From: Christoph Hellwig <hch@infradead.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: Damien Le Moal <damien.lemoal@wdc.com>,
linux-block@vger.kernel.org, Bart Van Assche <bvanassche@acm.org>
Subject: Re: [PATCH V2] block: Disable write plugging for zoned block devices
Date: Wed, 10 Jul 2019 09:37:55 -0700 [thread overview]
Message-ID: <20190710163755.GA6119@infradead.org> (raw)
In-Reply-To: <71be2c3f-2e26-dfd4-72de-2eabdddd311f@kernel.dk>
On Wed, Jul 10, 2019 at 09:57:05AM -0600, Jens Axboe wrote:
> On 7/10/19 9:54 AM, Damien Le Moal wrote:
> > diff --git a/block/blk-mq.h b/block/blk-mq.h
> > index 633a5a77ee8b..c9195a2cd670 100644
> > --- a/block/blk-mq.h
> > +++ b/block/blk-mq.h
> > @@ -238,4 +238,14 @@ static inline void blk_mq_clear_mq_map(struct blk_mq_queue_map *qmap)
> > qmap->mq_map[cpu] = 0;
> > }
> >
> > +static inline struct blk_plug *blk_mq_plug(struct request_queue *q,
> > + struct bio *bio)
> > +{
> > + if (!blk_queue_is_zoned(q) || !op_is_write(bio_op(bio)))
> > + return current->plug;
> > +
> > + /* Zoned block device write case: do not plug the BIO */
> > + return NULL;
> > +}
> > +
> > #endif
>
> Folks are going to look at that and be puzzled, I think that function
> deserves a comment.
Agreed. Also I'd reformat the conditionals to make the default
case more obvious:
if (blk_queue_is_zoned(q) && op_is_write(bio_op(bio)))
return NULL;
return current->plug;
prev parent reply other threads:[~2019-07-10 16:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-10 15:54 [PATCH V2] block: Disable write plugging for zoned block devices Damien Le Moal
2019-07-10 15:57 ` Jens Axboe
2019-07-10 16:37 ` Christoph Hellwig [this message]
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=20190710163755.GA6119@infradead.org \
--to=hch@infradead.org \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=damien.lemoal@wdc.com \
--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).