From: Christoph Hellwig Date: Fri, 13 Jun 2014 17:43:04 +0000 (+0200) Subject: blk-mq: properly drain stopped queues X-Git-Tag: v3.16-rc2~17^2~6 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=8f5280f4ee75333ca12bde99ef6280ff65a8af43;p=~emulex%2Finfiniband.git blk-mq: properly drain stopped queues If we need to drain a queue we need to run all queues, even if they are marked stopped to make sure the driver has a chance to error out on all queued requests. This fixes surprise removal with scsi-mq. Reported-by: Bart Van Assche Tested-by: Bart Van Assche Signed-off-by: Jens Axboe --- diff --git a/block/blk-mq.c b/block/blk-mq.c index e11f5f8e031..fd8b485d128 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -120,7 +120,7 @@ static void __blk_mq_drain_queue(struct request_queue *q) if (count == 0) break; - blk_mq_run_queues(q, false); + blk_mq_start_hw_queues(q); msleep(10); } }