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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Author: huhai <huhai@xxxxxxxxxx>
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@xxxxxxxxxx>

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);




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux