From: Ming Lei <ming.lei@redhat.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>
Cc: "hch@infradead.org" <hch@infradead.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"axboe@fb.com" <axboe@fb.com>, "osandov@fb.com" <osandov@fb.com>,
"hare@suse.com" <hare@suse.com>,
"wenxiong@us.ibm.com" <wenxiong@us.ibm.com>
Subject: Re: [PATCH] block: drain queue before waiting for q_usage_counter becoming zero
Date: Thu, 23 Nov 2017 06:28:41 +0800 [thread overview]
Message-ID: <20171122222839.GA7362@ming.t460p> (raw)
In-Reply-To: <1511369267.3061.5.camel@sandisk.com>
On Wed, Nov 22, 2017 at 04:47:48PM +0000, Bart Van Assche wrote:
> On Wed, 2017-11-22 at 13:11 +0800, Ming Lei wrote:
> > diff --git a/block/blk-mq.c b/block/blk-mq.c
> > index 11097477eeab..3d3797327491 100644
> > --- a/block/blk-mq.c
> > +++ b/block/blk-mq.c
> > @@ -161,6 +161,8 @@ void blk_freeze_queue(struct request_queue *q)
> > * exported to drivers as the only user for unfreeze is blk_mq.
> > */
> > blk_freeze_queue_start(q);
> > + if (!q->mq_ops)
> > + blk_drain_queue(q);
> > blk_mq_freeze_queue_wait(q);
> > }
>
> Since q_usage_counter now tracks legacy requests, is there any reason why we
> still need __blk_drain_queue()? Have you considered to eliminate
> __blk_drain_queue() and to call blk_run_queue() from inside blk_freeze_queue()
> instead of calling blk_drain_queue()? I'm asking this because
Yeah, that looks better, I am thinking of that too, will do this way
in V2.
--
Ming
prev parent reply other threads:[~2017-11-22 22:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 5:11 [PATCH] block: drain queue before waiting for q_usage_counter becoming zero Ming Lei
2017-11-22 7:04 ` Hannes Reinecke
2017-11-22 8:10 ` Ming Lei
2017-11-22 16:47 ` Bart Van Assche
2017-11-22 22:28 ` Ming Lei [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=20171122222839.GA7362@ming.t460p \
--to=ming.lei@redhat.com \
--cc=Bart.VanAssche@wdc.com \
--cc=axboe@fb.com \
--cc=hare@suse.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=osandov@fb.com \
--cc=wenxiong@us.ibm.com \
/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