aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob N <[email protected]>2023-04-07 03:52:50 +1000
committerGitHub <[email protected]>2023-04-06 10:52:50 -0700
commitff73574cd83580e4dd5905a43695bd5d0f4911b3 (patch)
treedafac4839b704033e7e14d7483ef7c81d3859369
parenta8a127e2c9f352ba797cd6625d61840b425d6534 (diff)
vdev: expose zfs_vdev_max_ms_shift as a module parameter
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Tino Reichardt <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Rob Norris <[email protected]> Sponsored-by: Klara, Inc. Sponsored-by: Seagate Technology LLC Closes #14719
-rw-r--r--man/man4/zfs.45
-rw-r--r--module/zfs/vdev.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/man/man4/zfs.4 b/man/man4/zfs.4
index 566caae7b..d52914746 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 ad932a7ba..7cf858c05 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");