blk-mq: return when hctx is stopped in blk_mq_run_work_fn

If a hardware queue is stopped, it should not be run again before
explicitly started. Ignore stopped queues in blk_mq_run_work_fn(),
fixing a regression recently introduced when the START_ON_RUN bit
was removed.

Fixes: 15fe8a90bb ("blk-mq: remove blk_mq_delay_queue()")
Reviewed-by: Ming Lei <[email protected]>
Reviewed-by: Bart Van Assche <[email protected]>
Signed-off-by: Jianchao Wang <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Jianchao Wang 2018-06-04 17:03:55 +08:00 • committed by Jens Axboe
commit 0196d6b408

View file

@ -1475,7 +1475,7 @@ static void blk_mq_run_work_fn(struct work_struct *work)
* If we are stopped, don't run the queue.
*/
if (test_bit(BLK_MQ_S_STOPPED, &hctx->state))
clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
return;
__blk_mq_run_hw_queue(hctx);
}