diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-04-04 15:40:00 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:01 -0400 |
commit | d18a2c447524751137a12cc8ccaf9d1e0b7fa1b3 (patch) | |
tree | f331995fdac5f2550c8c3fccf74a94a66d642893 /fs/btrfs/extent-tree.c | |
parent | 6bc34676c0b5836655ec1c7998e2647cabb933ec (diff) |
Btrfs: Fix allocation profile init
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 0c0dde6d961..0cb742884cd 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -1100,7 +1100,6 @@ printk("space info full %Lu\n", flags); | |||
1100 | start, num_bytes); | 1100 | start, num_bytes); |
1101 | BUG_ON(ret); | 1101 | BUG_ON(ret); |
1102 | 1102 | ||
1103 | set_avail_alloc_bits(extent_root->fs_info, flags); | ||
1104 | return 0; | 1103 | return 0; |
1105 | } | 1104 | } |
1106 | 1105 | ||
@@ -2813,13 +2812,7 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans, | |||
2813 | &cache->space_info); | 2812 | &cache->space_info); |
2814 | BUG_ON(ret); | 2813 | BUG_ON(ret); |
2815 | 2814 | ||
2816 | if (type & BTRFS_BLOCK_GROUP_DATA) { | 2815 | bit = block_group_state_bits(type); |
2817 | bit = BLOCK_GROUP_DATA; | ||
2818 | } else if (type & BTRFS_BLOCK_GROUP_SYSTEM) { | ||
2819 | bit = BLOCK_GROUP_SYSTEM; | ||
2820 | } else if (type & BTRFS_BLOCK_GROUP_METADATA) { | ||
2821 | bit = BLOCK_GROUP_METADATA; | ||
2822 | } | ||
2823 | set_extent_bits(block_group_cache, chunk_objectid, | 2816 | set_extent_bits(block_group_cache, chunk_objectid, |
2824 | chunk_objectid + size - 1, | 2817 | chunk_objectid + size - 1, |
2825 | bit | EXTENT_LOCKED, GFP_NOFS); | 2818 | bit | EXTENT_LOCKED, GFP_NOFS); |
@@ -2833,5 +2826,6 @@ int btrfs_make_block_group(struct btrfs_trans_handle *trans, | |||
2833 | finish_current_insert(trans, extent_root); | 2826 | finish_current_insert(trans, extent_root); |
2834 | ret = del_pending_extents(trans, extent_root); | 2827 | ret = del_pending_extents(trans, extent_root); |
2835 | BUG_ON(ret); | 2828 | BUG_ON(ret); |
2829 | set_avail_alloc_bits(extent_root->fs_info, type); | ||
2836 | return 0; | 2830 | return 0; |
2837 | } | 2831 | } |