diff options
author | 2025-04-22 15:04:51 +0100 | |
---|---|---|
committer | 2025-05-15 14:30:52 +0200 | |
commit | 25983713922494cbf823689bf4847cea3f841935 (patch) | |
tree | 25782c2d386f1c3d154292574a3670061cd32f25 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | btrfs: remove unnecessary NULL checks before freeing extent state (diff) | |
download | linux-rng-25983713922494cbf823689bf4847cea3f841935.tar.xz linux-rng-25983713922494cbf823689bf4847cea3f841935.zip |
btrfs: don't BUG_ON() when unpinning extents during transaction commit
In the final phase of a transaction commit, when unpinning extents at
btrfs_finish_extent_commit(), there's no need to BUG_ON() if we fail to
unpin an extent range. All that can happen is that we fail to return the
extent range to the in-memory free space cache, meaning no future space
allocations can reuse that extent range while the fs is mounted.
So instead return the error to the caller and make it abort the
transaction, so that the error is noticed and prevent misteriously leaking
space. We keep track of the first error we get while unpinning an extent
range and keep trying to unpin all the following extent ranges, so that
we attempt to do all discards. The transaction abort will deal with all
resource cleanups.
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions