diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/extent-tree.c | 11 | ||||
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
2 files changed, 2 insertions, 11 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 39761ca07f15..56e50137d0e6 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -4593,7 +4593,6 @@ int btrfs_reserve_extent(struct btrfs_trans_handle *trans, | |||
4593 | { | 4593 | { |
4594 | int ret; | 4594 | int ret; |
4595 | u64 search_start = 0; | 4595 | u64 search_start = 0; |
4596 | struct btrfs_fs_info *info = root->fs_info; | ||
4597 | 4596 | ||
4598 | data = btrfs_get_alloc_profile(root, data); | 4597 | data = btrfs_get_alloc_profile(root, data); |
4599 | again: | 4598 | again: |
@@ -4601,17 +4600,9 @@ again: | |||
4601 | * the only place that sets empty_size is btrfs_realloc_node, which | 4600 | * the only place that sets empty_size is btrfs_realloc_node, which |
4602 | * is not called recursively on allocations | 4601 | * is not called recursively on allocations |
4603 | */ | 4602 | */ |
4604 | if (empty_size || root->ref_cows) { | 4603 | if (empty_size || root->ref_cows) |
4605 | if (!(data & BTRFS_BLOCK_GROUP_METADATA)) { | ||
4606 | ret = do_chunk_alloc(trans, root->fs_info->extent_root, | ||
4607 | 2 * 1024 * 1024, | ||
4608 | BTRFS_BLOCK_GROUP_METADATA | | ||
4609 | (info->metadata_alloc_profile & | ||
4610 | info->avail_metadata_alloc_bits), 0); | ||
4611 | } | ||
4612 | ret = do_chunk_alloc(trans, root->fs_info->extent_root, | 4604 | ret = do_chunk_alloc(trans, root->fs_info->extent_root, |
4613 | num_bytes + 2 * 1024 * 1024, data, 0); | 4605 | num_bytes + 2 * 1024 * 1024, data, 0); |
4614 | } | ||
4615 | 4606 | ||
4616 | WARN_ON(num_bytes < root->sectorsize); | 4607 | WARN_ON(num_bytes < root->sectorsize); |
4617 | ret = find_free_extent(trans, root, num_bytes, empty_size, | 4608 | ret = find_free_extent(trans, root, num_bytes, empty_size, |
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 7eda483d7b5a..198cff28766d 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -2209,7 +2209,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, | |||
2209 | max_chunk_size = 10 * calc_size; | 2209 | max_chunk_size = 10 * calc_size; |
2210 | min_stripe_size = 64 * 1024 * 1024; | 2210 | min_stripe_size = 64 * 1024 * 1024; |
2211 | } else if (type & BTRFS_BLOCK_GROUP_METADATA) { | 2211 | } else if (type & BTRFS_BLOCK_GROUP_METADATA) { |
2212 | max_chunk_size = 4 * calc_size; | 2212 | max_chunk_size = 256 * 1024 * 1024; |
2213 | min_stripe_size = 32 * 1024 * 1024; | 2213 | min_stripe_size = 32 * 1024 * 1024; |
2214 | } else if (type & BTRFS_BLOCK_GROUP_SYSTEM) { | 2214 | } else if (type & BTRFS_BLOCK_GROUP_SYSTEM) { |
2215 | calc_size = 8 * 1024 * 1024; | 2215 | calc_size = 8 * 1024 * 1024; |