Commit bc27c01b authored by Bart Van Assche's avatar Bart Van Assche Committed by Jens Axboe
Browse files

blk-mq: Do not invoke .queue_rq() for a stopped queue

The meaning of the BLK_MQ_S_STOPPED flag is "do not call
.queue_rq()". Hence modify blk_mq_make_request() such that requests
are queued instead of issued if a queue has been stopped.
Reported-by: default avatarMing Lei <>
Signed-off-by: default avatarBart Van Assche <>
Reviewed-by: default avatarChristoph Hellwig <>
Reviewed-by: default avatarMing Lei <>
Reviewed-by: default avatarHannes Reinecke <>
Reviewed-by: default avatarJohannes Thumshirn <>
Reviewed-by: default avatarSagi Grimberg <>
Cc: <>
Signed-off-by: default avatarJens Axboe <>
parent 2cefe4db
......@@ -1317,9 +1317,9 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
if (!old_rq)
goto done;
if (!blk_mq_direct_issue_request(old_rq, &cookie))
goto done;
blk_mq_insert_request(old_rq, false, true, true);
if (test_bit(BLK_MQ_S_STOPPED, &data.hctx->state) ||
blk_mq_direct_issue_request(old_rq, &cookie) != 0)
blk_mq_insert_request(old_rq, false, true, true);
goto done;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment