btrfs-progs: Output extent tree leaf if we failed to find a backref
PATCH 1/1 btrfs-progs: Output extent tree leaf if we failed to find a backref
There is a bug report of BUG_ON() which is caused by __free_extent() failed to lookup a backref extent:
Failed to find [1429288337408, 168, 16384]
btrfs unable to find ref byte nr 1429288583168 parent 0 root 2 owner 0 offset 0 convert/source-ext2.c:834: ext2_copy_inodes: BUG_ON ret triggered, value -5 ./btrfs-convert[0x410941]
./btrfs-convert(main+0x1fdc)[0x40d3b8] /lib64/libc.so.6(__libc_start_main+0xf3)[0x7f93bb7d2f33] ./btrfs-convert(_start+0x2e)[0x40a96e]
It's still uncertain how this bug can be triggered, but adding such debug output will provide more info for us to debug.
--- extent-tree.c | 2 ++ 1 file changed, 2 insertions(+)
extent-tree.c +2 -0
@@ -2177,6 +2177,8 @@ static int __free_extent(struct btrfs_trans_handle *trans, (unsigned long long )root_objectid, (unsigned long long )owner_objectid, (unsigned long long)owner_offset); +printf ("path->slots[0]: %u path->nodes[0]:\n" , path->slots[0 ]); +btrfs_print_leaf (path->nodes[0 ]); ret = -EIO ; goto fail; }
Signature · 1 line
2.21.0
Quoted 10 lines · Qu Wenruo
There is a bug report of
BUG_ON()which is caused by__free_extent()failed to lookup a backref extent:
Failed to find [1429288337408, 168, 16384]
btrfs unable to find ref byte nr 1429288583168 parent 0 root 2 owner 0 offset 0convert/source-ext2.c:834:ext2_copy_inodes:BUG_ONret triggered, value -5 ./btrfs-convert[0x410941]
./btrfs-convert(main+0x1fdc)[0x40d3b8] /lib64/libc.so.6(__libc_start_main+0xf3)[0x7f93bb7d2f33] ./btrfs-convert(_start+0x2e)[0x40a96e]
Quoted 4 lines
It's still uncertain how this bug can be triggered, but adding such debug output will provide more info for us to debug.
Signed-off-by Qu Wenruo <[email protected]>
Added to devel, thanks.