Commit d05e4649 authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: rename btrfs_space_info_add_old_bytes

This name doesn't really fit with how the space reservation stuff works
now, rename it to btrfs_space_info_free_bytes_may_use so it's clear what
the function is doing.
Reviewed-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent def936e5
...@@ -54,7 +54,8 @@ static u64 block_rsv_release_bytes(struct btrfs_fs_info *fs_info, ...@@ -54,7 +54,8 @@ static u64 block_rsv_release_bytes(struct btrfs_fs_info *fs_info,
spin_unlock(&dest->lock); spin_unlock(&dest->lock);
} }
if (num_bytes) if (num_bytes)
btrfs_space_info_add_old_bytes(fs_info, space_info, btrfs_space_info_free_bytes_may_use(fs_info,
space_info,
num_bytes); num_bytes);
} }
if (qgroup_to_release_ret) if (qgroup_to_release_ret)
......
...@@ -158,7 +158,7 @@ void btrfs_migrate_to_delayed_refs_rsv(struct btrfs_fs_info *fs_info, ...@@ -158,7 +158,7 @@ void btrfs_migrate_to_delayed_refs_rsv(struct btrfs_fs_info *fs_info,
trace_btrfs_space_reservation(fs_info, "delayed_refs_rsv", trace_btrfs_space_reservation(fs_info, "delayed_refs_rsv",
0, num_bytes, 1); 0, num_bytes, 1);
if (to_free) if (to_free)
btrfs_space_info_add_old_bytes(fs_info, btrfs_space_info_free_bytes_may_use(fs_info,
delayed_refs_rsv->space_info, to_free); delayed_refs_rsv->space_info, to_free);
} }
......
...@@ -129,7 +129,7 @@ int btrfs_reserve_metadata_bytes(struct btrfs_root *root, ...@@ -129,7 +129,7 @@ int btrfs_reserve_metadata_bytes(struct btrfs_root *root,
void btrfs_try_granting_tickets(struct btrfs_fs_info *fs_info, void btrfs_try_granting_tickets(struct btrfs_fs_info *fs_info,
struct btrfs_space_info *space_info); struct btrfs_space_info *space_info);
static inline void btrfs_space_info_add_old_bytes( static inline void btrfs_space_info_free_bytes_may_use(
struct btrfs_fs_info *fs_info, struct btrfs_fs_info *fs_info,
struct btrfs_space_info *space_info, struct btrfs_space_info *space_info,
u64 num_bytes) u64 num_bytes)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment