summaryrefslogtreecommitdiff
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2019-06-19 20:47:18 +0300
committerDavid Sterba <dsterba@suse.com>2019-07-02 13:30:54 +0300
commit0b50174ad5e9fb32abcfdb10b1a14e76a72b20e6 (patch)
treec3c4d2b0cfd15c4db4cc10425285ec8c9bd3094b /fs/btrfs/extent-tree.c
parentd12ffdd1aa4c165774748265c67af3aa1edab1a0 (diff)
downloadlinux-0b50174ad5e9fb32abcfdb10b1a14e76a72b20e6.tar.xz
btrfs: export btrfs_block_rsv_add_bytes
This is used in a few places, we need to make sure it's exported so we can move it around. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 3f2ccfed3b0e..2f6e74803c9f 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -4382,8 +4382,8 @@ int btrfs_block_rsv_use_bytes(struct btrfs_block_rsv *block_rsv, u64 num_bytes)
return ret;
}
-static void block_rsv_add_bytes(struct btrfs_block_rsv *block_rsv,
- u64 num_bytes, bool update_size)
+void btrfs_block_rsv_add_bytes(struct btrfs_block_rsv *block_rsv,
+ u64 num_bytes, bool update_size)
{
spin_lock(&block_rsv->lock);
block_rsv->reserved += num_bytes;
@@ -4415,7 +4415,7 @@ int btrfs_cond_migrate_bytes(struct btrfs_fs_info *fs_info,
global_rsv->full = 0;
spin_unlock(&global_rsv->lock);
- block_rsv_add_bytes(dest, num_bytes, true);
+ btrfs_block_rsv_add_bytes(dest, num_bytes, true);
return 0;
}
@@ -4497,7 +4497,7 @@ int btrfs_delayed_refs_rsv_refill(struct btrfs_fs_info *fs_info,
num_bytes, flush);
if (ret)
return ret;
- block_rsv_add_bytes(block_rsv, num_bytes, 0);
+ btrfs_block_rsv_add_bytes(block_rsv, num_bytes, 0);
trace_btrfs_space_reservation(fs_info, "delayed_refs_rsv",
0, num_bytes, 1);
return 0;
@@ -4569,7 +4569,7 @@ int btrfs_block_rsv_migrate(struct btrfs_block_rsv *src,
if (ret)
return ret;
- block_rsv_add_bytes(dst, num_bytes, update_size);
+ btrfs_block_rsv_add_bytes(dst, num_bytes, update_size);
return 0;
}
@@ -4622,7 +4622,7 @@ int btrfs_block_rsv_add(struct btrfs_root *root,
ret = btrfs_reserve_metadata_bytes(root, block_rsv, num_bytes, flush);
if (!ret)
- block_rsv_add_bytes(block_rsv, num_bytes, true);
+ btrfs_block_rsv_add_bytes(block_rsv, num_bytes, true);
return ret;
}
@@ -4667,7 +4667,7 @@ int btrfs_block_rsv_refill(struct btrfs_root *root,
ret = btrfs_reserve_metadata_bytes(root, block_rsv, num_bytes, flush);
if (!ret) {
- block_rsv_add_bytes(block_rsv, num_bytes, false);
+ btrfs_block_rsv_add_bytes(block_rsv, num_bytes, false);
return 0;
}
@@ -5057,7 +5057,7 @@ int btrfs_delalloc_reserve_metadata(struct btrfs_inode *inode, u64 num_bytes)
spin_unlock(&inode->lock);
/* Now we can safely add our space to our block rsv */
- block_rsv_add_bytes(block_rsv, meta_reserve, false);
+ btrfs_block_rsv_add_bytes(block_rsv, meta_reserve, false);
trace_btrfs_space_reservation(root->fs_info, "delalloc",
btrfs_ino(inode), meta_reserve, 1);
@@ -7429,7 +7429,7 @@ try_reserve:
static void unuse_block_rsv(struct btrfs_fs_info *fs_info,
struct btrfs_block_rsv *block_rsv, u32 blocksize)
{
- block_rsv_add_bytes(block_rsv, blocksize, false);
+ btrfs_block_rsv_add_bytes(block_rsv, blocksize, false);
block_rsv_release_bytes(fs_info, block_rsv, NULL, 0, NULL);
}