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 <[email protected]>
Cc: Mauricio Faria de Oliveira <[email protected]>
Suggested-by: Bart Van Assche <[email protected]>
Signed-off-by: Ming Lei <[email protected]>
---
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