diff options
author | Matthew Macy <[email protected]> | 2019-09-05 14:49:49 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-09-05 14:49:49 -0700 |
commit | 03fdcb9adc596fb86a65edb56d8088b77ea2d891 (patch) | |
tree | c68cec08565296ad37d53677fdfbc4d5c6e7ef7d /module/zfs/mmp.c | |
parent | 65a91b166e66a57c44b62bb5ca20ccb6f0ecc46d (diff) |
Make module tunables cross platform
Adds ZFS_MODULE_PARAM to abstract module parameter
setting to operating systems other than Linux.
Reviewed-by: Jorgen Lundman <[email protected]>
Reviewed-by: Igor Kozhukhov <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #9230
Diffstat (limited to 'module/zfs/mmp.c')
-rw-r--r-- | module/zfs/mmp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/module/zfs/mmp.c b/module/zfs/mmp.c index 810d20fdd..ae8d6b1a0 100644 --- a/module/zfs/mmp.c +++ b/module/zfs/mmp.c @@ -717,7 +717,6 @@ mmp_signal_all_threads(void) } #if defined(_KERNEL) -#include <linux/mod_compat.h> static int param_set_multihost_interval(const char *val, zfs_kernel_param_t *kp) @@ -734,18 +733,19 @@ param_set_multihost_interval(const char *val, zfs_kernel_param_t *kp) return (ret); } -/* BEGIN CSTYLED */ -module_param(zfs_multihost_fail_intervals, uint, 0644); -MODULE_PARM_DESC(zfs_multihost_fail_intervals, - "Max allowed period without a successful mmp write"); +#endif +/* BEGIN CSTYLED */ +#if defined(_KERNEL) module_param_call(zfs_multihost_interval, param_set_multihost_interval, param_get_ulong, &zfs_multihost_interval, 0644); MODULE_PARM_DESC(zfs_multihost_interval, "Milliseconds between mmp writes to each leaf"); +#endif + +ZFS_MODULE_PARAM(zfs_multihost, zfs_multihost_, fail_intervals, UINT, ZMOD_RW, + "Max allowed period without a successful mmp write"); -module_param(zfs_multihost_import_intervals, uint, 0644); -MODULE_PARM_DESC(zfs_multihost_import_intervals, +ZFS_MODULE_PARAM(zfs_multihost, zfs_multihost_, import_intervals, UINT, ZMOD_RW, "Number of zfs_multihost_interval periods to wait for activity"); /* END CSTYLED */ -#endif |