btrfs: fix calculation of the global block reserve's size
authorFilipe Manana <fdmanana@suse.com>
Tue, 21 Mar 2023 11:13:57 +0000 (11:13 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Apr 2023 16:01:20 +0000 (18:01 +0200)
commitba4ec8fbce6c8b629a26d78cdd4a308cd0a503ca
treeee975e9e785c5da5af9ec8b24c95d5c6afec12f8
parentb13d57db90b859dadb33ccdb3716c9c3ed0a825d
btrfs: fix calculation of the global block reserve's size

At btrfs_update_global_block_rsv(), we are assuming an unlink operation
uses 5 metadata units, but that's not true anymore, it uses 6 since the
commit bca4ad7c0b54 ("btrfs: reserve correct number of items for unlink
and rmdir"). So update the code and comments to consider 6 units.

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>
fs/btrfs/block-rsv.c