Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297897
b: refs/heads/master
c: 7738a53
h: refs/heads/master
i:
  297895: a4e32d0
v: v3
  • Loading branch information
Ilya Dryomov committed Mar 27, 2012
1 parent 6f68aa1 commit 21155b3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc67c450837ec034174060a25889a55eed741a1d
refs/heads/master: 7738a53a3a3aa8d82350280ff4bc7df9c3094123
17 changes: 12 additions & 5 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -5248,22 +5248,29 @@ wait_block_group_cache_done(struct btrfs_block_group_cache *cache)
return 0;
}

static int get_block_group_index(struct btrfs_block_group_cache *cache)
static int __get_block_group_index(u64 flags)
{
int index;
if (cache->flags & BTRFS_BLOCK_GROUP_RAID10)

if (flags & BTRFS_BLOCK_GROUP_RAID10)
index = 0;
else if (cache->flags & BTRFS_BLOCK_GROUP_RAID1)
else if (flags & BTRFS_BLOCK_GROUP_RAID1)
index = 1;
else if (cache->flags & BTRFS_BLOCK_GROUP_DUP)
else if (flags & BTRFS_BLOCK_GROUP_DUP)
index = 2;
else if (cache->flags & BTRFS_BLOCK_GROUP_RAID0)
else if (flags & BTRFS_BLOCK_GROUP_RAID0)
index = 3;
else
index = 4;

return index;
}

static int get_block_group_index(struct btrfs_block_group_cache *cache)
{
return __get_block_group_index(cache->flags);
}

enum btrfs_loop_type {
LOOP_CACHING_NOWAIT = 0,
LOOP_CACHING_WAIT = 1,
Expand Down

0 comments on commit 21155b3

Please sign in to comment.