Patch "blk-mq: do not update io_ticks with passthrough requests" has been added to the 5.18-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    blk-mq: do not update io_ticks with passthrough requests

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     blk-mq-do-not-update-io_ticks-with-passthrough-reque.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit c4b0001b0d8eebbb544318ed9af1e340e198e73a
Author: Haisu Wang <haisuwang@xxxxxxxxxxx>
Date:   Mon May 30 14:40:59 2022 +0800

    blk-mq: do not update io_ticks with passthrough requests
    
    [ Upstream commit b81c14ca14b631aa1abae32fb5ae75b5e9251012 ]
    
    Flush or passthrough requests are not accounted as normal IO in completion.
    To reflect iostat for slow IO, io_ticks is updated when stat show called
    based on inflight numbers.
    It may cause inconsistent io_ticks calculation result.
    
    So do not account non-passthrough request when check inflight.
    
    Fixes: 86d7331299fd ("block: update io_ticks when io hang")
    Signed-off-by: Haisu Wang <haisuwang@xxxxxxxxxxx>
    Reviewed-by: samuelliao <samuelliao@xxxxxxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Link: https://lore.kernel.org/r/20220530064059.1120058-1-haisuwang@xxxxxxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 9d33e0032fee..de7fc6957271 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -133,7 +133,8 @@ static bool blk_mq_check_inflight(struct request *rq, void *priv,
 {
 	struct mq_inflight *mi = priv;
 
-	if ((!mi->part->bd_partno || rq->part == mi->part) &&
+	if (rq->part && blk_do_io_stat(rq) &&
+	    (!mi->part->bd_partno || rq->part == mi->part) &&
 	    blk_mq_rq_state(rq) == MQ_RQ_IN_FLIGHT)
 		mi->inflight[rq_data_dir(rq)]++;
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux