diff options
author | Jens Axboe <axboe@fb.com> | 2017-01-19 15:58:59 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-19 16:01:55 +0100 |
commit | 7e79dadce222e06e0c30a77280f3426014bee185 (patch) | |
tree | 5bc0b38c2eec503758700cc29d85cfdac8866405 /block/blk-mq.c | |
parent | blk-mq-tag: remove redundant check for 'data->hctx' being non-NULL (diff) | |
download | linux-7e79dadce222e06e0c30a77280f3426014bee185.tar.xz linux-7e79dadce222e06e0c30a77280f3426014bee185.zip |
blk-mq: stop hardware queue in blk_mq_delay_queue()
The run handler we register for the delayed work requires that the
queue be stopped, yet we leave that up to the caller. Let's move
it into blk_mq_delay_queue() itself, so that the API is sane.
This fixes a stall with SCSI, where it calls blk_mq_delay_queue()
without having stopped the queue. Hence the queue is never run.
Reported-by: Hannes Reinecke <hare@suse.com>
Fixes: 70f4db639c5b ("blk-mq: add blk_mq_delay_queue")
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to '')
-rw-r--r-- | block/blk-mq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index fa1f8619bfe7..b365cde4c909 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1170,6 +1170,7 @@ void blk_mq_delay_queue(struct blk_mq_hw_ctx *hctx, unsigned long msecs) if (unlikely(!blk_mq_hw_queue_mapped(hctx))) return; + blk_mq_stop_hw_queue(hctx); kblockd_schedule_delayed_work_on(blk_mq_hctx_next_cpu(hctx), &hctx->delay_work, msecs_to_jiffies(msecs)); } |