btrfs: change handle_fs_error in recover_log_trees to aborts
authorJosef Bacik <josef@toxicpanda.com>
Tue, 5 Oct 2021 20:35:23 +0000 (16:35 -0400)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:08:05 +0000 (19:08 +0200)
commitba51e2a11e389a1e928e16d616c1276423c3a89e
tree563b00976c44f3e0ac606ce957baa39a599fe4be
parent64259baa396f185cdb44eeb9432fd9b85b178a9a
btrfs: change handle_fs_error in recover_log_trees to aborts

During inspection of the return path for replay I noticed that we don't
actually abort the transaction if we get a failure during replay.  This
isn't a problem necessarily, as we properly return the error and will
fail to mount.  However we still leave this dangling transaction that
could conceivably be committed without thinking there was an error.

We were using btrfs_handle_fs_error() here, but that pre-dates the
transaction abort code.  Simply replace the btrfs_handle_fs_error()
calls with transaction aborts, so we still know where exactly things
went wrong, and add a few in some other un-handled error cases.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-log.c