提交 0c6af1cc 编写于 作者: M Ming Lei 提交者: Jens Axboe

blk-mq: put driver tag if dispatch budget can't be got

We have to put the driver tag if dispatch budget can't be got, otherwise
it might cause IO deadlock, especially in case that size of tags is very
small.

Fixes: de148297(blk-mq: introduce .get_budget and .put_budget in blk_mq_ops)
Signed-off-by: NMing Lei <ming.lei@redhat.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 f00c4d80
......@@ -1080,8 +1080,10 @@ bool blk_mq_dispatch_rq_list(struct request_queue *q, struct list_head *list,
}
}
if (!got_budget && !blk_mq_get_dispatch_budget(hctx))
if (!got_budget && !blk_mq_get_dispatch_budget(hctx)) {
blk_mq_put_driver_tag(rq);
break;
}
list_del_init(&rq->queuelist);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册