btrfs: rename the btrfs_calc_*_metadata_size helpers
authorJosef Bacik <josef@toxicpanda.com>
Thu, 22 Aug 2019 19:14:33 +0000 (15:14 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 9 Sep 2019 12:59:13 +0000 (14:59 +0200)
commit2bd36e7b4fd60d4ff5f9ba6a0ad84557ae4803c4
tree092a2fb134a8cb3387df0bde272d631aa8fd3e21
parent0785a9aacf9de9cd6a89a628b3b5d6b7e9ce5316
btrfs: rename the btrfs_calc_*_metadata_size helpers

btrfs_calc_trunc_metadata_size differs from trans_metadata_size in that
it doesn't take into account any splitting at the levels, because
truncate will never split nodes.  However truncate _and_ changing will
never split nodes, so rename btrfs_calc_trunc_metadata_size to
btrfs_calc_metadata_size.  Also btrfs_calc_trans_metadata_size is purely
for inserting items, so rename this to btrfs_calc_insert_metadata_size.
Making these clearer will help when I start using them differently in
upcoming patches.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
13 files changed:
fs/btrfs/block-group.c
fs/btrfs/ctree.h
fs/btrfs/delalloc-space.c
fs/btrfs/delayed-inode.c
fs/btrfs/delayed-ref.c
fs/btrfs/file.c
fs/btrfs/free-space-cache.c
fs/btrfs/inode-map.c
fs/btrfs/inode.c
fs/btrfs/props.c
fs/btrfs/root-tree.c
fs/btrfs/space-info.c
fs/btrfs/transaction.c