summaryrefslogtreecommitdiff
path: root/block/blk-exec.c
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2013-12-26 17:31:35 +0400
committerJens Axboe <axboe@kernel.dk>2013-12-31 20:53:05 +0400
commit43a5e4e21964a6efb4d14a34644ec7109d0ae891 (patch)
tree9ff635ec990583c0877d4056841d35e6018825a1 /block/blk-exec.c
parentb28bc9b38c52f63f43e3fd875af982f2240a2859 (diff)
downloadlinux-43a5e4e21964a6efb4d14a34644ec7109d0ae891.tar.xz
block: blk-mq: support draining mq queue
blk_mq_drain_queue() is introduced so that we can drain mq queue inside blk_cleanup_queue(). Also don't accept new requests any more if queue is marked as dying. Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-exec.c')
-rw-r--r--block/blk-exec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/blk-exec.c b/block/blk-exec.c
index c3edf9dff566..bbfc072a79c2 100644
--- a/block/blk-exec.c
+++ b/block/blk-exec.c
@@ -60,6 +60,10 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
rq->rq_disk = bd_disk;
rq->end_io = done;
+ /*
+ * don't check dying flag for MQ because the request won't
+ * be resued after dying flag is set
+ */
if (q->mq_ops) {
blk_mq_insert_request(q, rq, true);
return;