summaryrefslogtreecommitdiff
path: root/fs/btrfs/block-rsv.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2023-03-21 11:13:56 +0000
committerDavid Sterba <dsterba@suse.com>2023-04-17 18:01:20 +0200
commitb13d57db90b859dadb33ccdb3716c9c3ed0a825d (patch)
treea366dec6dd4c93fdcc79f503ebdb59f8b58ce340 /fs/btrfs/block-rsv.c
parent0e55a54502b977ded5fba30f8afdf450fdee94b7 (diff)
btrfs: calculate correct amount of space for delayed reference when evicting
When evicting an inode, we are incorrectly calculating the amount of space required for a single delayed reference in case the free space tree is enabled. We have to multiply by 2 the result of btrfs_calc_insert_metadata_size(). We should be calculating according to the size update and space release of the delayed block reserve logic at btrfs_update_delayed_refs_rsv() and btrfs_delayed_refs_rsv_release(). Fix this by using the btrfs_calc_delayed_ref_bytes() helper at evict_refill_and_join() instead of btrfs_calc_insert_metadata_size(). Reviewed-by: Josef Bacik <josef@toxicpanda.com> 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 'fs/btrfs/block-rsv.c')
0 files changed, 0 insertions, 0 deletions