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 <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10858
This commit is contained in:
Ryan Moeller
2020-09-01 19:19:19 -04:00
committed by GitHub
parent e84e49218f
commit 964791acdc
2 changed files with 11 additions and 17 deletions
+9 -15
View File
@@ -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");
/* BEGIN CSTYLED */
ZFS_MODULE_PARAM(zfs, zfs_, read_history, INT, ZMOD_RW,
"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");
ZFS_MODULE_PARAM(zfs, zfs_, read_history_hits, INT, ZMOD_RW,
"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");
ZFS_MODULE_PARAM(zfs_txg, zfs_txg_, history, INT, ZMOD_RW,
"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");
ZFS_MODULE_PARAM(zfs_multihost, zfs_multihost_, history, INT, ZMOD_RW,
"Historical statistics for last N multihost writes");
/* END CSTYLED */
#endif