Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128522
b: refs/heads/master
c: b97f920
h: refs/heads/master
v: v3
  • Loading branch information
Yan authored and Chris Mason committed Sep 25, 2008
1 parent bf308b2 commit 1dc957f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: 179e29e488cc74f1e9bd67bc45f70b832740e9ec
refs/heads/master: b97f9203b4d672c06eca50a1b1b99e4f69e1daf8
14 changes: 8 additions & 6 deletions trunk/fs/btrfs/extent-tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,16 +588,15 @@ static int update_block_group(struct btrfs_trans_handle *trans,
old_val < (cache->key.offset >> 1)) {
int bit_to_clear;
int bit_to_set;

cache->data = data;
if (data) {
bit_to_clear = BLOCK_GROUP_DATA;
bit_to_set = BLOCK_GROUP_METADATA;
bit_to_clear = BLOCK_GROUP_METADATA;
bit_to_set = BLOCK_GROUP_DATA;
cache->item.flags |=
BTRFS_BLOCK_GROUP_DATA;
} else {
bit_to_clear = BLOCK_GROUP_METADATA;
bit_to_set = BLOCK_GROUP_DATA;
bit_to_clear = BLOCK_GROUP_DATA;
bit_to_set = BLOCK_GROUP_METADATA;
cache->item.flags &=
~BTRFS_BLOCK_GROUP_DATA;
}
Expand Down Expand Up @@ -1459,13 +1458,16 @@ int btrfs_free_block_groups(struct btrfs_fs_info *info)
{
u64 start;
u64 end;
u64 ptr;
int ret;

while(1) {
ret = find_first_extent_bit(&info->block_group_cache, 0,
&start, &end, (unsigned int)-1);
if (ret)
break;
ret = get_state_private(&info->block_group_cache, start, &ptr);
if (!ret)
kfree((void *)(unsigned long)ptr);
clear_extent_bits(&info->block_group_cache, start,
end, (unsigned int)-1, GFP_NOFS);
}
Expand Down

0 comments on commit 1dc957f

Please sign in to comment.