]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: subpage: dump the involved bitmap when ASSERT() failed
authorQu Wenruo <wqu@suse.com>
Thu, 12 Dec 2024 06:14:01 +0000 (16:44 +1030)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Jan 2025 14:57:51 +0000 (15:57 +0100)
commit61d730731b47eeee42ad11fc71e145d269acab8d
treee357c1a15f3fc0c9078d1cb110ce52df207590b3
parent396294d1afee65a203d6cabd843d0782e5d7388e
btrfs: subpage: dump the involved bitmap when ASSERT() failed

For btrfs_folio_assert_not_dirty() and btrfs_folio_set_lock(), we call
bitmap_test_range_all_zero() to ensure the involved range has no
dirty/lock bit already set.

However with my recent enhanced delalloc range error handling, I was
hitting the ASSERT() inside btrfs_folio_set_lock(), and it turns out
that some error handling path is not properly updating the folio flags.

So add some extra dumping for the ASSERTs to dump the involved bitmap
to help debug.

Reviewed-by: Boris Burkov <boris@bur.io>
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