Make module tunables cross platform

Adds ZFS_MODULE_PARAM to abstract module parameter
setting to operating systems other than Linux.

Reviewed-by: Jorgen Lundman <lundman@lundman.net>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes #9230
This commit is contained in:
Matthew Macy
2019-09-05 14:49:49 -07:00
committed by Brian Behlendorf
parent 65a91b166e
commit 03fdcb9adc
43 changed files with 544 additions and 660 deletions
+4 -7
View File
@@ -996,13 +996,10 @@ dsl_process_sub_livelist(bpobj_t *bpobj, bplist_t *to_free, zthr_t *t,
return (err);
}
#if defined(_KERNEL)
/* CSTYLED */
module_param(zfs_livelist_max_entries, ulong, 0644);
MODULE_PARM_DESC(zfs_livelist_max_entries,
/* BEGIN CSTYLED */
ZFS_MODULE_PARAM(zfs_livelist, zfs_livelist_, max_entries, ULONG, ZMOD_RW,
"Size to start the next sub-livelist in a livelist");
module_param(zfs_livelist_min_percent_shared, int, 0644);
MODULE_PARM_DESC(zfs_livelist_min_percent_shared,
ZFS_MODULE_PARAM(zfs_livelist, zfs_livelist_, min_percent_shared, INT, ZMOD_RW,
"Threshold at which livelist is disabled");
#endif
/* END CSTYLED */