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 <bvanassche@acm.org>
Tested-by: Bart Van Assche <bvanassche@acm.org>

Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
Christoph Hellwig 2014-06-13 19:43:04 +02:00 committed by Jens Axboe
parent 28747fcd22
commit 8f5280f4ee
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}