]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: output more info when btrfs_subpage_assert() failed
authorQu Wenruo <wqu@suse.com>
Wed, 16 Jul 2025 08:13:06 +0000 (17:43 +0930)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 23:13:03 +0000 (01:13 +0200)
commitcec780a139f3d361973d798e918576b707fd5a3c
treeaea80f815bfbd5656d7b84658dc8a77bf4467908
parent4e346baee95f4688b36c9bd95664774c3d105c3d
btrfs: output more info when btrfs_subpage_assert() failed

The function btrfs_subpage_assert() is a very commonly utilized assert
to make sure the range passed in is correct inside the folio.

And when some code is not properly subpage/large folio compatible
btrfs_subpage_assert() will be the first to be triggered.
E.g. when I incorrectly enabled large folios for data reloc inodes, it
immediately triggered btrfs_subpage_assert().

In that case, outputting all the involved members will be very helpful,
this includes:

- start
- len
- folio position inside the mapping
- folio size

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/subpage.c