diff --git a/man/man4/zfs.4 b/man/man4/zfs.4 index 566caae7b4..d529147464 100644 --- a/man/man4/zfs.4 +++ b/man/man4/zfs.4 @@ -357,7 +357,10 @@ and the allocation can't actually be satisfied When a vdev is added, target this number of metaslabs per top-level vdev. . .It Sy zfs_vdev_default_ms_shift Ns = Ns Sy 29 Po 512 MiB Pc Pq uint -Default limit for metaslab size. +Default lower limit for metaslab size. +. +.It Sy zfs_vdev_max_ms_shift Ns = Ns Sy 34 Po 16 GiB Pc Pq uint +Default upper limit for metaslab size. . .It Sy zfs_vdev_max_auto_ashift Ns = Ns Sy 14 Pq uint Maximum ashift used when optimizing for logical \[->] physical sector size on diff --git a/module/zfs/vdev.c b/module/zfs/vdev.c index ad932a7ba7..7cf858c050 100644 --- a/module/zfs/vdev.c +++ b/module/zfs/vdev.c @@ -96,7 +96,7 @@ static uint_t zfs_vdev_ms_count_limit = 1ULL << 17; static uint_t zfs_vdev_default_ms_shift = 29; /* upper limit for metaslab size (16G) */ -static const uint_t zfs_vdev_max_ms_shift = 34; +static uint_t zfs_vdev_max_ms_shift = 34; int vdev_validate_skip = B_FALSE; @@ -6288,7 +6288,10 @@ ZFS_MODULE_PARAM(zfs_vdev, zfs_vdev_, default_ms_count, UINT, ZMOD_RW, "Target number of metaslabs per top-level vdev"); ZFS_MODULE_PARAM(zfs_vdev, zfs_vdev_, default_ms_shift, UINT, ZMOD_RW, - "Default limit for metaslab size"); + "Default lower limit for metaslab size"); + +ZFS_MODULE_PARAM(zfs_vdev, zfs_vdev_, max_ms_shift, UINT, ZMOD_RW, + "Default upper limit for metaslab size"); ZFS_MODULE_PARAM(zfs_vdev, zfs_vdev_, min_ms_count, UINT, ZMOD_RW, "Minimum number of metaslabs per top-level vdev");