Patch "blk-flush: fix rq->flush.seq for post-flush requests" has been added to the 6.5-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-flush: fix rq->flush.seq for post-flush requests

to the 6.5-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-flush-fix-rq-flush.seq-for-post-flush-requests.patch
and it can be found in the queue-6.5 subdirectory.

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



commit 8bdf3af3a70916bb66ad64a98df585c113b715a6
Author: Chengming Zhou <zhouchengming@xxxxxxxxxxxxx>
Date:   Mon Jul 17 12:00:56 2023 +0800

    blk-flush: fix rq->flush.seq for post-flush requests
    
    [ Upstream commit 28b241237470981a96fbd82077c8044466b61e5f ]
    
    If the policy == (REQ_FSEQ_DATA | REQ_FSEQ_POSTFLUSH), it means that the
    data sequence and post-flush sequence need to be done for this request.
    
    The rq->flush.seq should record what sequences have been done (or don't
    need to be done). So in this case, pre-flush doesn't need to be done,
    we should init rq->flush.seq to REQ_FSEQ_PREFLUSH not REQ_FSEQ_POSTFLUSH.
    
    Fixes: 615939a2ae73 ("blk-mq: defer to the normal submission path for post-flush requests")
    Signed-off-by: Chengming Zhou <zhouchengming@xxxxxxxxxxxxx>
    Reviewed-by: Christoph Hellwig <hch@xxxxxx>
    Link: https://lore.kernel.org/r/20230717040058.3993930-3-chengming.zhou@xxxxxxxxx
    Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/block/blk-flush.c b/block/blk-flush.c
index 8220517c2d67d..fdc489e0ea162 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -443,7 +443,7 @@ bool blk_insert_flush(struct request *rq)
 		 * the post flush, and then just pass the command on.
 		 */
 		blk_rq_init_flush(rq);
-		rq->flush.seq |= REQ_FSEQ_POSTFLUSH;
+		rq->flush.seq |= REQ_FSEQ_PREFLUSH;
 		spin_lock_irq(&fq->mq_flush_lock);
 		list_move_tail(&rq->flush.list, &fq->flush_data_in_flight);
 		spin_unlock_irq(&fq->mq_flush_lock);



[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