Commit 8484764e authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

btrfs: temporarily export btrfs_get_restripe_target

This gets used by a few different logical chunks of the block group
code, export it while we move things around.
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 4358d963
...@@ -197,5 +197,6 @@ static inline int btrfs_block_group_cache_done( ...@@ -197,5 +197,6 @@ static inline int btrfs_block_group_cache_done(
} }
int __btrfs_inc_block_group_ro(struct btrfs_block_group_cache *cache, int force); int __btrfs_inc_block_group_ro(struct btrfs_block_group_cache *cache, int force);
u64 btrfs_get_restripe_target(struct btrfs_fs_info *fs_info, u64 flags);
#endif /* BTRFS_BLOCK_GROUP_H */ #endif /* BTRFS_BLOCK_GROUP_H */
...@@ -3048,7 +3048,7 @@ int btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr) ...@@ -3048,7 +3048,7 @@ int btrfs_extent_readonly(struct btrfs_fs_info *fs_info, u64 bytenr)
* *
* should be called with balance_lock held * should be called with balance_lock held
*/ */
static u64 get_restripe_target(struct btrfs_fs_info *fs_info, u64 flags) u64 btrfs_get_restripe_target(struct btrfs_fs_info *fs_info, u64 flags)
{ {
struct btrfs_balance_control *bctl = fs_info->balance_ctl; struct btrfs_balance_control *bctl = fs_info->balance_ctl;
u64 target = 0; u64 target = 0;
...@@ -3089,7 +3089,7 @@ static u64 btrfs_reduce_alloc_profile(struct btrfs_fs_info *fs_info, u64 flags) ...@@ -3089,7 +3089,7 @@ static u64 btrfs_reduce_alloc_profile(struct btrfs_fs_info *fs_info, u64 flags)
* try to reduce to the target profile * try to reduce to the target profile
*/ */
spin_lock(&fs_info->balance_lock); spin_lock(&fs_info->balance_lock);
target = get_restripe_target(fs_info, flags); target = btrfs_get_restripe_target(fs_info, flags);
if (target) { if (target) {
/* pick target profile only if it's already available */ /* pick target profile only if it's already available */
if ((flags & target) & BTRFS_EXTENDED_PROFILE_MASK) { if ((flags & target) & BTRFS_EXTENDED_PROFILE_MASK) {
...@@ -6538,7 +6538,7 @@ static u64 update_block_group_flags(struct btrfs_fs_info *fs_info, u64 flags) ...@@ -6538,7 +6538,7 @@ static u64 update_block_group_flags(struct btrfs_fs_info *fs_info, u64 flags)
* if restripe for this chunk_type is on pick target profile and * if restripe for this chunk_type is on pick target profile and
* return, otherwise do the usual balance * return, otherwise do the usual balance
*/ */
stripped = get_restripe_target(fs_info, flags); stripped = btrfs_get_restripe_target(fs_info, flags);
if (stripped) if (stripped)
return extended_to_chunk(stripped); return extended_to_chunk(stripped);
......
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