diff options
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/extent-tree.c | 3 | ||||
-rw-r--r-- | fs/btrfs/volumes.c | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index e0ad5f0f895e..700879ed64cf 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -3384,6 +3384,9 @@ static int should_alloc_chunk(struct btrfs_root *root, | |||
3384 | 3384 | ||
3385 | /* 256MB or 2% of the FS */ | 3385 | /* 256MB or 2% of the FS */ |
3386 | thresh = max_t(u64, 256 * 1024 * 1024, div_factor_fine(thresh, 2)); | 3386 | thresh = max_t(u64, 256 * 1024 * 1024, div_factor_fine(thresh, 2)); |
3387 | /* system chunks need a much small threshold */ | ||
3388 | if (sinfo->flags & BTRFS_BLOCK_GROUP_SYSTEM) | ||
3389 | thresh = 32 * 1024 * 1024; | ||
3387 | 3390 | ||
3388 | if (num_bytes > thresh && sinfo->bytes_used < div_factor(num_bytes, 8)) | 3391 | if (num_bytes > thresh && sinfo->bytes_used < div_factor(num_bytes, 8)) |
3389 | return 0; | 3392 | return 0; |
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 59e878f9fdcc..7ffdb154daec 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -3166,7 +3166,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, | |||
3166 | max_stripe_size = 256 * 1024 * 1024; | 3166 | max_stripe_size = 256 * 1024 * 1024; |
3167 | max_chunk_size = max_stripe_size; | 3167 | max_chunk_size = max_stripe_size; |
3168 | } else if (type & BTRFS_BLOCK_GROUP_SYSTEM) { | 3168 | } else if (type & BTRFS_BLOCK_GROUP_SYSTEM) { |
3169 | max_stripe_size = 8 * 1024 * 1024; | 3169 | max_stripe_size = 32 * 1024 * 1024; |
3170 | max_chunk_size = 2 * max_stripe_size; | 3170 | max_chunk_size = 2 * max_stripe_size; |
3171 | } else { | 3171 | } else { |
3172 | printk(KERN_ERR "btrfs: invalid chunk type 0x%llx requested\n", | 3172 | printk(KERN_ERR "btrfs: invalid chunk type 0x%llx requested\n", |