mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
Btrfs: use bigger metadata chunks on bigger filesystems
The 256MB chunk is a little small on a huge FS. This scales up the chunk size. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
cf1d72c9ce
commit
1100373f8a
1 changed files with 5 additions and 1 deletions
|
@ -2441,6 +2441,10 @@ 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) {
|
||||
/* 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) {
|
||||
|
|
Loading…
Reference in a new issue