]> www.infradead.org Git - users/dwmw2/linux.git/commit
btrfs: handle empty list of NOCOW ordered extents with checksum list
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Fri, 4 Oct 2024 13:19:01 +0000 (15:19 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 11 Nov 2024 13:34:14 +0000 (14:34 +0100)
commit61b4d75e3c5c10d523d95e19728dd5a6e2fd58f9
tree7da7bec2afb06386c32371b15592a54e5b9c93c9
parent7f91c6a78a0e0125e69f6aef05914aeb2d91a2eb
btrfs: handle empty list of NOCOW ordered extents with checksum list

Currently we BUG_ON() in btrfs_finish_one_ordered() if we are finishing
an ordered extent that is flagged as NOCOW, but it's checksum list is
not empty.

This is clearly a logic error which we can recover from by aborting the
transaction.

For developer builds which enable CONFIG_BTRFS_ASSERT, also ASSERT()
that the list is empty.

Suggested-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c