diff options
author | Jeff Mahoney <jeffm@suse.com> | 2017-05-17 17:38:35 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-06-19 18:25:59 +0200 |
commit | 1b86826d12dc4acf9576cad9c43da74025dc8074 (patch) | |
tree | f641fee8f721be73f3808c796e93e983d132ff9e /fs/btrfs/ctree.h | |
parent | btrfs: fix bool type in btrfs_page_exists_in_range (diff) | |
download | linux-1b86826d12dc4acf9576cad9c43da74025dc8074.tar.xz linux-1b86826d12dc4acf9576cad9c43da74025dc8074.zip |
btrfs: cleanup root usage by btrfs_get_alloc_profile
There are two places where we don't already know what kind of alloc
profile we need before calling btrfs_get_alloc_profile, but we need
access to a root everywhere we call it.
This patch adds helpers for btrfs_{data,metadata,system}_alloc_profile()
and relegates btrfs_system_alloc_profile to a static for use in those
two cases. The next patch will eliminate one of those.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index c457cb177340..c13b4859df73 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -2681,7 +2681,9 @@ void btrfs_get_block_group_trimming(struct btrfs_block_group_cache *cache); void btrfs_put_block_group_trimming(struct btrfs_block_group_cache *cache); void btrfs_create_pending_block_groups(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info); -u64 btrfs_get_alloc_profile(struct btrfs_root *root, int data); +u64 btrfs_data_alloc_profile(struct btrfs_fs_info *fs_info); +u64 btrfs_metadata_alloc_profile(struct btrfs_fs_info *fs_info); +u64 btrfs_system_alloc_profile(struct btrfs_fs_info *fs_info); void btrfs_clear_space_info_full(struct btrfs_fs_info *info); enum btrfs_reserve_flush_enum { |