aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent-tree.c
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2012-11-21 09:18:10 -0500
committerChris Mason <chris.mason@fusionio.com>2012-12-16 20:46:28 -0500
commit31e502298d80e2af9001d17dc419a3fd4b0bebef (patch)
tree24606ea4998e962fff864eb24e8be6f56b095e14 /fs/btrfs/extent-tree.c
parent4ded4f639533ed5f02a0f0ab20d43bb9659c91f8 (diff)
Btrfs: put raid properties into global table
Raid properties can be shared among raid calculation code, we can put them into a global table to keep it simple. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r--fs/btrfs/extent-tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index e15280989188..b9526f749049 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -5479,7 +5479,7 @@ wait_block_group_cache_done(struct btrfs_block_group_cache *cache)
5479 return 0; 5479 return 0;
5480} 5480}
5481 5481
5482static int __get_block_group_index(u64 flags) 5482int __get_raid_index(u64 flags)
5483{ 5483{
5484 int index; 5484 int index;
5485 5485
@@ -5499,7 +5499,7 @@ static int __get_block_group_index(u64 flags)
5499 5499
5500static int get_block_group_index(struct btrfs_block_group_cache *cache) 5500static int get_block_group_index(struct btrfs_block_group_cache *cache)
5501{ 5501{
5502 return __get_block_group_index(cache->flags); 5502 return __get_raid_index(cache->flags);
5503} 5503}
5504 5504
5505enum btrfs_loop_type { 5505enum btrfs_loop_type {
@@ -7441,7 +7441,7 @@ int btrfs_can_relocate(struct btrfs_root *root, u64 bytenr)
7441 */ 7441 */
7442 target = get_restripe_target(root->fs_info, block_group->flags); 7442 target = get_restripe_target(root->fs_info, block_group->flags);
7443 if (target) { 7443 if (target) {
7444 index = __get_block_group_index(extended_to_chunk(target)); 7444 index = __get_raid_index(extended_to_chunk(target));
7445 } else { 7445 } else {
7446 /* 7446 /*
7447 * this is just a balance, so if we were marked as full 7447 * this is just a balance, so if we were marked as full