Patch "btrfs: call btrfs_orig_bbio_end_io in btrfs_end_bio_work" has been added to the 6.3-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

    btrfs: call btrfs_orig_bbio_end_io in btrfs_end_bio_work

to the 6.3-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:
     btrfs-call-btrfs_orig_bbio_end_io-in-btrfs_end_bio_w.patch
and it can be found in the queue-6.3 subdirectory.

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



commit ad6930056b58ed4a06925aa96c27185a2a35ceb5
Author: Sasha Levin <sashal@xxxxxxxxxx>
Date:   Tue Jun 6 10:37:40 2023 -0400

    btrfs: call btrfs_orig_bbio_end_io in btrfs_end_bio_work
    
    [ Upstream commit 45c2f36871955b51b4ce083c447388d8c72d6b91 ]
    
    When I implemented the storage layer bio splitting, I was under the
    assumption that we'll never split metadata bios.  But Qu reminded me that
    this can actually happen with very old file systems with unaligned
    metadata chunks and RAID0.
    
    I still haven't seen such a case in practice, but we better handled this
    case, especially as it is fairly easily to do not calling the ->end_іo
    method directly in btrfs_end_io_work, and using the proper
    btrfs_orig_bbio_end_io helper instead.
    
    In addition to the old file system with unaligned metadata chunks case
    documented in the commit log, the combination of the new scrub code
    with Johannes pending raid-stripe-tree also triggers this case.  We
    spent some time debugging it and found that this patch solves
    the problem.
    
    Fixes: 103c19723c80 ("btrfs: split the bio submission path into a separate file")
    CC: stable@xxxxxxxxxxxxxxx # 6.3+
    Reviewed-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>
    Tested-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx>
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Signed-off-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/btrfs/bio.c b/fs/btrfs/bio.c
index 726592868e9c5..ada899613486a 100644
--- a/fs/btrfs/bio.c
+++ b/fs/btrfs/bio.c
@@ -307,7 +307,7 @@ static void btrfs_end_bio_work(struct work_struct *work)
 
 	/* Metadata reads are checked and repaired by the submitter. */
 	if (bbio->bio.bi_opf & REQ_META)
-		bbio->end_io(bbio);
+		btrfs_orig_bbio_end_io(bbio);
 	else
 		btrfs_check_read_bio(bbio, bbio->bio.bi_private);
 }



[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