diff mbox series

[v6,4/4] btrfs: increase metadata alloc size to 5GB for volumes > 50GB

Message ID 20211203220445.2312182-5-shr@fb.com (mailing list archive)
State New, archived
Headers show
Series btrfs: sysfs: set / query btrfs chunk size | expand

Commit Message

Stefan Roesch Dec. 3, 2021, 10:04 p.m. UTC
This increases the metadata default allocation size from 1GB to 5GB for
volumes with a size greater than 50GB.

Signed-off-by: Stefan Roesch <shr@fb.com>
---
 fs/btrfs/space-info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c
index 437d1240f491..cda78aa1ee4f 100644
--- a/fs/btrfs/space-info.c
+++ b/fs/btrfs/space-info.c
@@ -195,7 +195,7 @@  static u64 compute_chunk_size_regular(struct btrfs_fs_info *info, u64 flags)
 
 	/* Handle BTRFS_BLOCK_GROUP_METADATA */
 	if (info->fs_devices->total_rw_bytes > 50ULL * SZ_1G)
-		return SZ_1G;
+		return 5ULL * SZ_1G;
 
 	return SZ_256M;
 }