From bbb971d623604cab92614efbf70f4580f3cf2a4c Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Fri, 6 Jan 2012 15:47:38 -0500 Subject: [PATCH] --- yaml --- r: 285949 b: refs/heads/master c: 1100373f8aa69e377386499350496e3d8565605f h: refs/heads/master i: 285947: 7d91945c0e4f137b2d58fc8be8d2217c604d2f58 v: v3 --- [refs] | 2 +- trunk/fs/btrfs/volumes.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index ad34a1e21799..a0c791299910 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cf1d72c9ceec391d34c48724da57282e97f01122 +refs/heads/master: 1100373f8aa69e377386499350496e3d8565605f diff --git a/trunk/fs/btrfs/volumes.c b/trunk/fs/btrfs/volumes.c index f4b839fd3c9d..ac00e3aa80a1 100644 --- a/trunk/fs/btrfs/volumes.c +++ b/trunk/fs/btrfs/volumes.c @@ -2441,7 +2441,11 @@ static int __btrfs_alloc_chunk(struct btrfs_trans_handle *trans, max_stripe_size = 1024 * 1024 * 1024; max_chunk_size = 10 * max_stripe_size; } else if (type & BTRFS_BLOCK_GROUP_METADATA) { - max_stripe_size = 256 * 1024 * 1024; + /* for larger filesystems, use larger metadata chunks */ + if (fs_devices->total_rw_bytes > 50ULL * 1024 * 1024 * 1024) + max_stripe_size = 1024 * 1024 * 1024; + else + 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;