diff options
author | Josef Bacik <[email protected]> | 2018-10-11 15:54:21 -0400 |
---|---|---|
committer | David Sterba <[email protected]> | 2018-10-19 12:20:03 +0200 |
commit | 49940bdd57779c78462da7aa5a8650b2fea8c2ff (patch) | |
tree | 857e78f94bed8f2024aa9468aeaee91efaa4bca7 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | fb5c39d7a887108087de6ff93d3f326b01b4ef41 (diff) |
btrfs: only free reserved extent if we didn't insert it
When we insert the file extent once the ordered extent completes we free
the reserved extent reservation as it'll have been migrated to the
bytes_used counter. However if we error out after this step we'll still
clear the reserved extent reservation, resulting in a negative
accounting of the reserved bytes for the block group and space info.
Fix this by only doing the free if we didn't successfully insert a file
extent for this extent.
CC: [email protected] # 4.14+
Reviewed-by: Omar Sandoval <[email protected]>
Reviewed-by: Filipe Manana <[email protected]>
Signed-off-by: Josef Bacik <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions