From: Ming Lei <ming.lei@redhat.com>
To: Jens Axboe <axboe@fb.com>,
linux-block@vger.kernel.org,
Christoph Hellwig <hch@infradead.org>
Cc: Omar Sandoval <osandov@fb.com>,
Bart Van Assche <bart.vanassche@sandisk.com>,
Hannes Reinecke <hare@suse.com>, Wen Xiong <wenxiong@us.ibm.com>,
Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>,
Ming Lei <ming.lei@redhat.com>
Subject: [PATCH V2 1/2] block: run queue before waiting for q_usage_counter becoming zero
Date: Thu, 23 Nov 2017 12:47:59 +0800 [thread overview]
Message-ID: <20171123044800.25251-2-ming.lei@redhat.com> (raw)
In-Reply-To: <20171123044800.25251-1-ming.lei@redhat.com>
Now we track legacy requests with .q_usage_counter in commit 055f6e18e08f
("block: Make q_usage_counter also track legacy requests"), but that
commit never runs legacy queue before waiting for this counter becoming zero,
then IO hang is caused in the test of pulling disk during IO.
This patch fixes the issue by running queue in blk_freeze_queue_start() like
blk-mq before waiting for q_usage_counter becoming zero.
Fixes: 055f6e18e08f("block: Make q_usage_counter also track legacy requests")
Cc: Wen Xiong <wenxiong@us.ibm.com>
Cc: Mauricio Faria de Oliveira <mauricfo@linux.vnet.ibm.com>
Suggested-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
block/blk-mq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 11097477eeab..e2b6a57b004d 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -128,6 +128,8 @@ void blk_freeze_queue_start(struct request_queue *q)
percpu_ref_kill(&q->q_usage_counter);
if (q->mq_ops)
blk_mq_run_hw_queues(q, false);
+ else
+ blk_run_queue(q);
}
}
EXPORT_SYMBOL_GPL(blk_freeze_queue_start);
--
2.9.5
next prev parent reply other threads:[~2017-11-23 4:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-23 4:47 [PATCH V2 0/2] block: fix queue freeze and cleanup Ming Lei
2017-11-23 4:47 ` Ming Lei [this message]
2017-11-27 12:15 ` [PATCH V2 1/2] block: run queue before waiting for q_usage_counter becoming zero Mauricio Faria de Oliveira
2017-11-23 4:48 ` [PATCH V2 2/2] block: drain blkcg part of request_queue in blk_cleanup_queue() Ming Lei
2017-11-27 12:15 ` Mauricio Faria de Oliveira
2017-11-27 12:41 ` [PATCH V2 0/2] block: fix queue freeze and cleanup Ming Lei
2017-11-29 2:57 ` chenxiang (M)
2017-11-29 4:54 ` Ming Lei
2017-11-29 5:40 ` chenxiang (M)
2017-12-01 15:36 ` Mauricio Faria de Oliveira
2017-12-01 15:42 ` Ming Lei
2017-12-01 16:08 ` Bart Van Assche
2017-12-01 17:35 ` Ming Lei
2017-12-01 18:49 ` Mauricio Faria de Oliveira
2017-12-02 0:49 ` Ming Lei
2017-12-04 12:31 ` Mauricio Faria de Oliveira
2017-12-13 21:49 ` Bart Van Assche
2017-12-20 14:34 ` Mauricio Faria de Oliveira
2017-12-13 21:53 ` Bart Van Assche
2017-12-15 7:58 ` chenxiang (M)
2017-12-15 17:44 ` Bart Van Assche
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=20171123044800.25251-2-ming.lei@redhat.com \
--to=ming.lei@redhat.com \
--cc=axboe@fb.com \
--cc=bart.vanassche@sandisk.com \
--cc=hare@suse.com \
--cc=hch@infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=mauricfo@linux.vnet.ibm.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.