diff options
author | Chris Mason <chris.mason@oracle.com> | 2012-01-16 14:13:11 +0100 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2012-01-16 21:38:24 +0100 |
commit | 96bdc7dc61fb1b1e8e858dafb13abee8482ba064 (patch) | |
tree | eddbfc7a931c7063ded4505c99d11d1702117064 /fs/btrfs/extent-tree.c | |
parent | Btrfs: add a delalloc mutex to inodes for delalloc reservations (diff) | |
download | linux-96bdc7dc61fb1b1e8e858dafb13abee8482ba064.tar.xz linux-96bdc7dc61fb1b1e8e858dafb13abee8482ba064.zip |
Btrfs: use larger system chunks
system chunks by default are very small. This makes them slightly
larger and also fixes the conditional checks to make sure we don't
allocate a billion of them at once.
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 | 3 |
1 files changed, 3 insertions, 0 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, /* 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; |