diff options
author | Nikolay Borisov <[email protected]> | 2020-01-20 16:09:11 +0200 |
---|---|---|
committer | David Sterba <[email protected]> | 2020-03-23 17:01:36 +0100 |
commit | 10e958d523f82e976e5bdb13898da0e0b3af61e0 (patch) | |
tree | 681df269f573cfcfaaaa7ce005a9b4d20d976763 /tools/perf/scripts/python/failed-syscalls-by-pid.py | |
parent | 6787bb9f35157f718b53e6b63461e446a148e751 (diff) |
btrfs: Call btrfs_pin_reserved_extent only during active transaction
Calling btrfs_pin_reserved_extent makes sense only with a valid
transaction since pinned extents are processed from transaction commit
in btrfs_finish_extent_commit. In case of error it's sufficient to
adjust the reserved counter to account for log tree extents allocated in
the last transaction.
This commit moves btrfs_pin_reserved_extent to be called only with valid
transaction handle and otherwise uses the newly introduced
unaccount_log_buffer to adjust "reserved". If this is not done if a
failure occurs before transaction is committed WARN_ON are going to be
triggered on unmount. This was especially pronounced with generic/475
test.
Reviewed-by: Josef Bacik <[email protected]>
Signed-off-by: Nikolay Borisov <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/failed-syscalls-by-pid.py')
0 files changed, 0 insertions, 0 deletions