btrfs: don't silently ignore unexpected extent type when replaying log
authorFilipe Manana <fdmanana@suse.com>
Tue, 3 Jun 2025 21:06:17 +0000 (22:06 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 19 Jun 2025 13:20:47 +0000 (15:20 +0200)
commit16edae52f60658caeaa0702e7cb6b738a09d4ad4
tree49378ca6b48884d874b3a0f1acb1300b508e4356
parent2dcf838cf5c2f0f4501edaa1680fcad03618d760
btrfs: don't silently ignore unexpected extent type when replaying log

If there's an unexpected (invalid) extent type, we just silently ignore
it. This means a corruption or some bug somewhere, so instead return
-EUCLEAN to the caller, making log replay fail, and print an error message
with relevant information.

Reviewed-by: Boris Burkov <boris@bur.io>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-log.c