diff options
author | Ming Lei <tom.leiming@gmail.com> | 2013-12-26 14:31:35 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2013-12-31 17:53:05 +0100 |
commit | 43a5e4e21964a6efb4d14a34644ec7109d0ae891 (patch) | |
tree | 9ff635ec990583c0877d4056841d35e6018825a1 /block/blk-exec.c | |
parent | Merge tag 'v3.13-rc6' into for-3.14/core (diff) | |
download | linux-43a5e4e21964a6efb4d14a34644ec7109d0ae891.tar.xz linux-43a5e4e21964a6efb4d14a34644ec7109d0ae891.zip |
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, 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; |