blk-mq: properly drain stopped queues
authorChristoph Hellwig <hch@lst.de>
Fri, 13 Jun 2014 17:43:04 +0000 (19:43 +0200)
committerJens Axboe <axboe@fb.com>
Mon, 30 Mar 2015 18:54:53 +0000 (12:54 -0600)
commitcff7fdcb1056a36fe7f5b0a7c398ed73a564455e
tree18c42624ce069c374d49d931c7dea9b68c8a7d61
parenta9ea98b5a9564e7503d24fa23f527a6981a5c297
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>
block/blk-mq.c