History

btrfs: output extra debug info if we failed to find an inline backref

[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.

Qu Wenruo committed 3 years ago

Commit 7f72f501 parent 76c51261 file · +5 −0Browse files

Unified · Split

fs/btrfs/extent-tree.c+5−0
@@ -848,6 +848,11 @@ again: · 847 unmodified lines
848848 err = -ENOENT;
849849 goto out;
850850 } else if (WARN_ON(ret)) {
851+ btrfs_print_leaf(path->nodes[0]);
852+ btrfs_err(fs_info,
853+"extent item not found for insert, bytenr %llu num_bytes %llu parent %llu root_objectid %llu owner %llu offset %llu",
854+ bytenr, num_bytes, parent, root_objectid, owner,
855+ offset);
851856 err = -EIO;
852857 goto out;
853858 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t