blk-mq: for sync case, whether it is mq or sq make_request instances, we should send the request directly
Author: huhai <[email protected]> Date: Wed May 16 10:34:22 2018 +0800
blk-mq: for sync case, whether it is mq or sq make_request instances, we should send the request directly
For sq make_request instances, we should issue sync request directly too, otherwise it will break down the semantics of sync request, the current code logic is to send synchronous requests asynchronously.
Signed-off-by huhai <[email protected]>
block/blk-mq.c +1 -1
@@ -1771,7 +1771,7 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)blk_mq_try_issue_directly (data.hctx, same_queue_rq, &cookie); } - }else if (q->nr_hw_queues >1 && is_sync) { + }else if (is_sync) {blk_mq_put_ctx (data.ctx);blk_mq_bio_to_request (rq, bio);blk_mq_try_issue_directly (data.hctx, rq, &cookie);