diff options
author | 2020-01-20 16:09:08 +0200 | |
---|---|---|
committer | 2020-03-23 17:01:36 +0100 | |
commit | f603bb94abbed5b5542cfb514ddfa3c5dda96bcc (patch) | |
tree | ab131720098f0d6ebd7a8deeefa0b293b785bb6e /fs/btrfs/tree-log.c | |
parent | btrfs: sysfs, unify handler name of devinfo/missing (diff) | |
download | wireguard-linux-f603bb94abbed5b5542cfb514ddfa3c5dda96bcc.tar.xz wireguard-linux-f603bb94abbed5b5542cfb514ddfa3c5dda96bcc.zip |
btrfs: Perform pinned cleanup directly in btrfs_destroy_delayed_refs
Having btrfs_destroy_delayed_refs call btrfs_pin_extent is problematic
for making pinned extents tracking per-transaction since
btrfs_trans_handle cannot be passed to btrfs_pin_extent in this context.
Additionally delayed refs heads pinned in btrfs_destroy_delayed_refs
are going to be handled very closely, in btrfs_destroy_pinned_extent.
To enable btrfs_pin_extent to take btrfs_trans_handle simply open code
it in btrfs_destroy_delayed_refs and call btrfs_error_unpin_extent_range
on the range. This enables us to do less work in
btrfs_destroy_pinned_extent and leaves btrfs_pin_extent being called in
contexts which have a valid btrfs_trans_handle.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tree-log.c')
0 files changed, 0 insertions, 0 deletions