]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: subpage: dump the involved bitmap when ASSERT() failed
authorQu Wenruo <wqu@suse.com>
Mon, 12 Jan 2026 14:55:50 +0000 (09:55 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 17 Jan 2026 15:31:26 +0000 (16:31 +0100)
commitfb4fa3f9012bbcc672cac63efa53e4d813d77584
tree7ae2180333b05e10f014b1088f003ee3423c0c5d
parent9ed14c3b787ba092a725163f6768cc56504fd31f
btrfs: subpage: dump the involved bitmap when ASSERT() failed

[ Upstream commit 61d730731b47eeee42ad11fc71e145d269acab8d ]

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>
Stable-dep-of: e9e3b22ddfa7 ("btrfs: fix beyond-EOF write handling")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/subpage.c