]> git.ipfire.org Git - thirdparty/linux.git/commit
btrfs: abort transaction where errors happen during log tree replay
authorFilipe Manana <fdmanana@suse.com>
Fri, 18 Jul 2025 07:30:21 +0000 (08:30 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Sep 2025 08:54:29 +0000 (10:54 +0200)
commit912c257c88cd8c9a466a3cf702912a03a979fd06
tree2c9a1b9d4633f8006645f0f0213cbc1cf3f1960f
parent874576d2a79a2e94cffc89b3bd0c285141b99208
btrfs: abort transaction where errors happen during log tree replay

In the replay_one_buffer() log tree walk callback we return errors to the
log tree walk caller and then the caller aborts the transaction, if we
have one, or turns the fs into error state if we don't have one. While
this reduces code it makes it harder to figure out where exactly an error
came from. So add the transaction aborts after every failure inside the
replay_one_buffer() callback and the functions it calls, making it as
fine grained as possible, so that it helps figuring out why failures
happen.

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