Commit 80e9baed authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: export and rename qgroup_reserve_meta

Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 0f9c03d8
...@@ -3841,7 +3841,7 @@ static int sub_root_meta_rsv(struct btrfs_root *root, int num_bytes, ...@@ -3841,7 +3841,7 @@ static int sub_root_meta_rsv(struct btrfs_root *root, int num_bytes,
return num_bytes; return num_bytes;
} }
static int qgroup_reserve_meta(struct btrfs_root *root, int num_bytes, int btrfs_qgroup_reserve_meta(struct btrfs_root *root, int num_bytes,
enum btrfs_qgroup_rsv_type type, bool enforce) enum btrfs_qgroup_rsv_type type, bool enforce)
{ {
struct btrfs_fs_info *fs_info = root->fs_info; struct btrfs_fs_info *fs_info = root->fs_info;
...@@ -3873,14 +3873,14 @@ int __btrfs_qgroup_reserve_meta(struct btrfs_root *root, int num_bytes, ...@@ -3873,14 +3873,14 @@ int __btrfs_qgroup_reserve_meta(struct btrfs_root *root, int num_bytes,
{ {
int ret; int ret;
ret = qgroup_reserve_meta(root, num_bytes, type, enforce); ret = btrfs_qgroup_reserve_meta(root, num_bytes, type, enforce);
if (ret <= 0 && ret != -EDQUOT) if (ret <= 0 && ret != -EDQUOT)
return ret; return ret;
ret = try_flush_qgroup(root); ret = try_flush_qgroup(root);
if (ret < 0) if (ret < 0)
return ret; return ret;
return qgroup_reserve_meta(root, num_bytes, type, enforce); return btrfs_qgroup_reserve_meta(root, num_bytes, type, enforce);
} }
void btrfs_qgroup_free_meta_all_pertrans(struct btrfs_root *root) void btrfs_qgroup_free_meta_all_pertrans(struct btrfs_root *root)
......
...@@ -361,6 +361,8 @@ int btrfs_qgroup_release_data(struct btrfs_inode *inode, u64 start, u64 len); ...@@ -361,6 +361,8 @@ int btrfs_qgroup_release_data(struct btrfs_inode *inode, u64 start, u64 len);
int btrfs_qgroup_free_data(struct btrfs_inode *inode, int btrfs_qgroup_free_data(struct btrfs_inode *inode,
struct extent_changeset *reserved, u64 start, struct extent_changeset *reserved, u64 start,
u64 len); u64 len);
int btrfs_qgroup_reserve_meta(struct btrfs_root *root, int num_bytes,
enum btrfs_qgroup_rsv_type type, bool enforce);
int __btrfs_qgroup_reserve_meta(struct btrfs_root *root, int num_bytes, int __btrfs_qgroup_reserve_meta(struct btrfs_root *root, int num_bytes,
enum btrfs_qgroup_rsv_type type, bool enforce); enum btrfs_qgroup_rsv_type type, bool enforce);
/* Reserve metadata space for pertrans and prealloc type */ /* Reserve metadata space for pertrans and prealloc type */
......
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