mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add zfs_multihost_interval tunable handler for FreeBSD
This tunable required a handler to be implemented for ZFS_MODULE_PARAM_CALL. Add the handler so the tunable can be declared in common code. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10490
This commit is contained in:
@@ -691,3 +691,18 @@ param_set_slop_shift(SYSCTL_HANDLER_ARGS)
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int
|
||||
param_set_multihost_interval(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = sysctl_handle_long(oidp, arg1, 0, req);
|
||||
if (err != 0 || req->newptr == NULL)
|
||||
return (err);
|
||||
|
||||
if (spa_mode_global != SPA_MODE_UNINIT)
|
||||
mmp_signal_all_threads();
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#include <sys/zfs_context.h>
|
||||
#include <sys/mmp.h>
|
||||
|
||||
static int
|
||||
int
|
||||
param_set_multihost_interval(const char *val, zfs_kernel_param_t *kp)
|
||||
{
|
||||
int ret;
|
||||
@@ -39,8 +39,3 @@ param_set_multihost_interval(const char *val, zfs_kernel_param_t *kp)
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
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");
|
||||
|
||||
Reference in New Issue
Block a user