diff mbox

blk-mq: for sync case, whether it is mq or sq make_request instances, we should send the request directly

Message ID tencent_1673E9D0031A9B033DE36EDB@qq.com (mailing list archive)
State New, archived
Headers show

Commit Message

huhai May 16, 2018, 3:43 a.m. UTC
Author: huhai <huhai@kylinos.cn>
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 <huhai@kylinos.cn>
diff mbox

Patch

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 5629f18..fcf2f16 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -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);