diff options
author | Ming Lei <tom.leiming@gmail.com> | 2013-12-26 08:31:35 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-12-31 11:53:05 -0500 |
commit | 43a5e4e21964a6efb4d14a34644ec7109d0ae891 (patch) | |
tree | 9ff635ec990583c0877d4056841d35e6018825a1 /block/blk-exec.c | |
parent | b28bc9b38c52f63f43e3fd875af982f2240a2859 (diff) |
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.c | 4 |
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, | |||
60 | rq->rq_disk = bd_disk; | 60 | rq->rq_disk = bd_disk; |
61 | rq->end_io = done; | 61 | rq->end_io = done; |
62 | 62 | ||
63 | /* | ||
64 | * don't check dying flag for MQ because the request won't | ||
65 | * be resued after dying flag is set | ||
66 | */ | ||
63 | if (q->mq_ops) { | 67 | if (q->mq_ops) { |
64 | blk_mq_insert_request(q, rq, true); | 68 | blk_mq_insert_request(q, rq, true); |
65 | return; | 69 | return; |