aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/spa_stats.c
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-09-01 19:19:19 -0400
committerGitHub <[email protected]>2020-09-01 16:19:19 -0700
commit964791acdcc99182d8a36e7f65ae15bf988886be (patch)
tree072d803b1cbbc593d828a9c80936e9e2a404b709 /module/zfs/spa_stats.c
parente84e49218f448369929c5c426220445d1698f044 (diff)
Make spa_stats.c tunables visible on FreeBSD
Use ZFS_MODULE_PARAM for cross-platform tunables in spa_stats.c, and add update tunables.cfg in tests for the newly supported ones. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10858
Diffstat (limited to 'module/zfs/spa_stats.c')
-rw-r--r--module/zfs/spa_stats.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/module/zfs/spa_stats.c b/module/zfs/spa_stats.c
index 5c1073c14..cf0be3c45 100644
--- a/module/zfs/spa_stats.c
+++ b/module/zfs/spa_stats.c
@@ -1028,22 +1028,16 @@ spa_stats_destroy(spa_t *spa)
spa_mmp_history_destroy(spa);
}
-#if defined(_KERNEL)
-/* CSTYLED */
-module_param(zfs_read_history, int, 0644);
-MODULE_PARM_DESC(zfs_read_history,
- "Historical statistics for the last N reads");
-
-module_param(zfs_read_history_hits, int, 0644);
-MODULE_PARM_DESC(zfs_read_history_hits,
- "Include cache hits in read history");
-
-module_param(zfs_txg_history, int, 0644);
-MODULE_PARM_DESC(zfs_txg_history,
- "Historical statistics for the last N txgs");
-
-module_param(zfs_multihost_history, int, 0644);
-MODULE_PARM_DESC(zfs_multihost_history,
- "Historical statistics for last N multihost writes");
+/* BEGIN CSTYLED */
+ZFS_MODULE_PARAM(zfs, zfs_, read_history, INT, ZMOD_RW,
+ "Historical statistics for the last N reads");
+
+ZFS_MODULE_PARAM(zfs, zfs_, read_history_hits, INT, ZMOD_RW,
+ "Include cache hits in read history");
+
+ZFS_MODULE_PARAM(zfs_txg, zfs_txg_, history, INT, ZMOD_RW,
+ "Historical statistics for the last N txgs");
+
+ZFS_MODULE_PARAM(zfs_multihost, zfs_multihost_, history, INT, ZMOD_RW,
+ "Historical statistics for last N multihost writes");
/* END CSTYLED */
-#endif