summaryrefslogtreecommitdiff
path: root/fs/btrfs/compression.c
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2023-03-30 15:39:03 +0100
committerDavid Sterba <dsterba@suse.com>2023-04-03 15:43:12 +0200
commit1b113e4222f253c9dc8d3733f2cea47b89459075 (patch)
tree6a142f7acd14bed518acd1344940d0ee8f138e8a /fs/btrfs/compression.c
parent4a22a05a63f40cf9635fdc704279a1eff47d2c59 (diff)
downloadlinux-next-1b113e4222f253c9dc8d3733f2cea47b89459075.tar.gz
btrfs: correctly calculate delayed ref bytes when starting transaction
When starting a transaction, we are assuming the number of bytes used for each delayed ref update matches the number of bytes used for each item update, that is the return value of: btrfs_calc_insert_metadata_size(fs_info, num_items) However that is not correct when we are using the free space tree, as we need to multiply that value by 2, since delayed ref updates need to modify the free space tree besides the extent tree. So fix this by using btrfs_calc_delayed_ref_bytes() to get the correct number of bytes used for delayed ref updates. Signed-off-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.c')
0 files changed, 0 insertions, 0 deletions