diff options
author | Ming Lei <ming.lei@redhat.com> | 2017-10-27 12:43:30 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2017-11-01 08:20:34 -0600 |
commit | 1f460b63d4b37f504d8d0affc2cd492eb005ea97 (patch) | |
tree | 829611af2a709a83ac018bf6c1d083e2fde02659 /block/blk-mq.c | |
parent | 358a3a6bccb74da9d63a26b2dd5f09f1e9970e0b (diff) |
blk-mq: don't restart queue when .get_budget returns BLK_STS_RESOURCE
SCSI restarts its queue in scsi_end_request() automatically, so we don't
need to handle this case in blk-mq.
Especailly any request won't be dequeued in this case, we needn't to
worry about IO hang caused by restart vs. dispatch.
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 097ca3ece716..e4d2490f4e7e 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1226,7 +1226,6 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list, static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx) { int srcu_idx; - bool run_queue; /* * We should be running this queue from one of the CPUs that @@ -1243,18 +1242,15 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx) if (!(hctx->flags & BLK_MQ_F_BLOCKING)) { rcu_read_lock(); - run_queue = blk_mq_sched_dispatch_requests(hctx); + blk_mq_sched_dispatch_requests(hctx); rcu_read_unlock(); } else { might_sleep(); srcu_idx = srcu_read_lock(hctx->queue_rq_srcu); - run_queue = blk_mq_sched_dispatch_requests(hctx); + blk_mq_sched_dispatch_requests(hctx); srcu_read_unlock(hctx->queue_rq_srcu, srcu_idx); } - - if (run_queue) - blk_mq_run_hw_queue(hctx, true); } /* |