Patch "btrfs: output extra debug info if we failed to find an inline backref" has been added to the 5.15-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: output extra debug info if we failed to find an inline backref

to the 5.15-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-output-extra-debug-info-if-we-failed-to-find-a.patch
and it can be found in the queue-5.15 subdirectory.

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



commit c77600d3b3e704450560c619f569dd42e3f09f68
Author: Qu Wenruo <wqu@xxxxxxxx>
Date:   Tue Aug 1 19:02:28 2023 +0800

    btrfs: output extra debug info if we failed to find an inline backref
    
    [ Upstream commit 7f72f50547b7af4ddf985b07fc56600a4deba281 ]
    
    [BUG]
    Syzbot reported several warning triggered inside
    lookup_inline_extent_backref().
    
    [CAUSE]
    As usual, the reproducer doesn't reliably trigger locally here, but at
    least we know the WARN_ON() is triggered when an inline backref can not
    be found, and it can only be triggered when @insert is true. (I.e.
    inserting a new inline backref, which means the backref should already
    exist)
    
    [ENHANCEMENT]
    After the WARN_ON(), dump all the parameters and the extent tree
    leaf to help debug.
    
    Link: https://syzkaller.appspot.com/bug?extid=d6f9ff86c1d804ba2bc6
    Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
    Reviewed-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 597cc2607481c..48f2de789b755 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -860,6 +860,11 @@ int lookup_inline_extent_backref(struct btrfs_trans_handle *trans,
 		err = -ENOENT;
 		goto out;
 	} else if (WARN_ON(ret)) {
+		btrfs_print_leaf(path->nodes[0]);
+		btrfs_err(fs_info,
+"extent item not found for insert, bytenr %llu num_bytes %llu parent %llu root_objectid %llu owner %llu offset %llu",
+			  bytenr, num_bytes, parent, root_objectid, owner,
+			  offset);
 		err = -EIO;
 		goto out;
 	}



[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