From c4e075fd536120e9d19bb884066fc68f7ab7ce7f Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Mon, 16 Jan 2012 08:13:11 -0500 Subject: [PATCH] --- yaml --- r: 286014 b: refs/heads/master c: 96bdc7dc61fb1b1e8e858dafb13abee8482ba064 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/btrfs/extent-tree.c | 3 +++ trunk/fs/btrfs/volumes.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 67a9c2abbc13..84f246c65148 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f248679e86fead40cc78e724c7181d6bec1a2046 +refs/heads/master: 96bdc7dc61fb1b1e8e858dafb13abee8482ba064 diff --git a/trunk/fs/btrfs/extent-tree.c b/trunk/fs/btrfs/extent-tree.c index e0ad5f0f895e..700879ed64cf 100644 --- a/trunk/fs/btrfs/extent-tree.c +++ b/trunk/fs/btrfs/extent-tree.c @@ -3384,6 +3384,9 @@ static int should_alloc_chunk(struct btrfs_root *root, /* 256MB or 2% of the FS */ thresh = max_t(u64, 256 * 1024 * 1024, div_factor_fine(thresh, 2)); + /* system chunks need a much small threshold */ + if (sinfo->flags & BTRFS_BLOCK_GROUP_SYSTEM) + thresh = 32 * 1024 * 1024; if (num_bytes > thresh && sinfo->bytes_used < div_factor(num_bytes, 8)) return 0; diff --git a/trunk/fs/btrfs/volumes.c b/trunk/fs/btrfs/volumes.c index 59e878f9fdcc..7ffdb154daec 100644 --- a/trunk/fs/btrfs/volumes.c +++ b/trunk/fs/btrfs/volumes.c @@ -3166,7 +3166,7 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, max_stripe_size = 256 * 1024 * 1024; max_chunk_size = max_stripe_size; } else if (type & BTRFS_BLOCK_GROUP_SYSTEM) { - max_stripe_size = 8 * 1024 * 1024; + max_stripe_size = 32 * 1024 * 1024; max_chunk_size = 2 * max_stripe_size; } else { printk(KERN_ERR "btrfs: invalid chunk type 0x%llx requested\n",