diff options
author | Filipe Manana <fdmanana@suse.com> | 2023-07-26 16:57:03 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2023-08-21 14:52:17 +0200 |
commit | 1b6948acb854b88162f273a26f9324d167051700 (patch) | |
tree | 8820081863bef8e2ea1c071d30308543c04ce71a /fs/btrfs/disk-io.c | |
parent | 1ff9fee3bd2e865c81d29684dd40a91698f7999b (diff) | |
download | linux-1b6948acb854b88162f273a26f9324d167051700.tar.gz linux-1b6948acb854b88162f273a26f9324d167051700.tar.bz2 linux-1b6948acb854b88162f273a26f9324d167051700.zip |
btrfs: don't steal space from global rsv after a transaction abort
When doing a priority metadata space reclaim, while we are going through
the flush states and running their respective operations, it's possible
that a transaction abort happened, for example when running delayed refs
we hit -ENOSPC or in the critical section of transaction commit we failed
with -ENOSPC or some other error. In these cases a transaction was aborted
and the fs turned into error state. If that happened, then it makes no
sense to steal from the global block reserve and return success to the
caller if the stealing was successful - the caller will later get an
error when attempting to modify the fs. Instead make the ticket fail if
we have the fs in error state and don't attempt to steal from the global
rsv, as it's not only it's pointless, it also simplifies debugging some
-ENOSPC problems.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
0 files changed, 0 insertions, 0 deletions