summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/free-space-cache.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2019-06-20 21:37:43 +0200
committerDavid Sterba <dsterba@suse.com>2019-09-09 14:59:03 +0200
commit478b4d9f0105e33cae34445d5ad2eb9798628231 (patch)
tree204ed991c49d9752a83b0b90ec5ec068d3a1aac0 /fs/btrfs/free-space-cache.c
parentbtrfs: tree-log: use symbolic name for first replay stage (diff)
downloadlinux-478b4d9f0105e33cae34445d5ad2eb9798628231.tar.xz
linux-478b4d9f0105e33cae34445d5ad2eb9798628231.zip
btrfs: move btrfs_add_free_space out of a header file
This is prep work for moving block_group_cache around. Having this in the header file makes the header file include need to be in a certain order, which is awkward, so just move it into free-space-cache.c and then we can re-arrange later. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/free-space-cache.c')
-rw-r--r--fs/btrfs/free-space-cache.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 062be9dde4c6..92cb06dd94d3 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -2376,6 +2376,14 @@ out:
return ret;
}
+int btrfs_add_free_space(struct btrfs_block_group_cache *block_group,
+ u64 bytenr, u64 size)
+{
+ return __btrfs_add_free_space(block_group->fs_info,
+ block_group->free_space_ctl,
+ bytenr, size);
+}
+
int btrfs_remove_free_space(struct btrfs_block_group_cache *block_group,
u64 offset, u64 bytes)
{