]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
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>
Fri, 13 Jun 2014 18:17:38 +0000 (12:17 -0600)
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

index e11f5f8e0313e08b5fd4ec11a1fd25cfbc872477..fd8b485d128821f81c8ed387b4fa179c471be4aa 100644 (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);
        }
 }