diff options
author | Ryan Moeller <[email protected]> | 2020-04-07 13:06:22 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-07 10:06:22 -0700 |
commit | 7e3df9db128722143734a9459771365ea19c1c40 (patch) | |
tree | 6010642540ab0b9d8eb6dd819a8b2ca7137b981c /include/sys | |
parent | 2a15c6aab40e854808f2d910ee998cd405769dfa (diff) |
Finish refactoring for ZFS_MODULE_PARAM_CALL
Linux and FreeBSD have different parameters for tunable proc handler.
This has prevented FreeBSD from implementing the ZFS_MODULE_PARAM_CALL
macro.
To complete the sharing of ZFS_MODULE_PARAM_CALL declarations, create
per-platform definitions of the parameter list, ZFS_MODULE_PARAM_ARGS.
With the declarations wired up we discovered an incorrect scope prefix
for spa_slop_shift, so this is now fixed.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #10179
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/arc_impl.h | 4 | ||||
-rw-r--r-- | include/sys/spa.h | 8 | ||||
-rw-r--r-- | include/sys/zfs_context.h | 1 |
3 files changed, 7 insertions, 6 deletions
diff --git a/include/sys/arc_impl.h b/include/sys/arc_impl.h index c55640f8b..d4167945f 100644 --- a/include/sys/arc_impl.h +++ b/include/sys/arc_impl.h @@ -614,8 +614,8 @@ extern uint64_t arc_free_memory(void); extern int64_t arc_available_memory(void); extern void arc_tuning_update(void); -extern int param_set_arc_long(const char *buf, zfs_kernel_param_t *kp); -extern int param_set_arc_int(const char *buf, zfs_kernel_param_t *kp); +extern int param_set_arc_long(ZFS_MODULE_PARAM_ARGS); +extern int param_set_arc_int(ZFS_MODULE_PARAM_ARGS); #ifdef __cplusplus } diff --git a/include/sys/spa.h b/include/sys/spa.h index 780119e9a..e1fab3c69 100644 --- a/include/sys/spa.h +++ b/include/sys/spa.h @@ -1179,10 +1179,10 @@ extern void spa_notify_waiters(spa_t *spa); extern void spa_wake_waiters(spa_t *spa); /* module param call functions */ -int param_set_deadman_ziotime(const char *val, zfs_kernel_param_t *kp); -int param_set_deadman_synctime(const char *val, zfs_kernel_param_t *kp); -int param_set_slop_shift(const char *buf, zfs_kernel_param_t *kp); -int param_set_deadman_failmode(const char *val, zfs_kernel_param_t *kp); +int param_set_deadman_ziotime(ZFS_MODULE_PARAM_ARGS); +int param_set_deadman_synctime(ZFS_MODULE_PARAM_ARGS); +int param_set_slop_shift(ZFS_MODULE_PARAM_ARGS); +int param_set_deadman_failmode(ZFS_MODULE_PARAM_ARGS); #ifdef ZFS_DEBUG #define dprintf_bp(bp, fmt, ...) do { \ diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h index 39c778b1e..00642175d 100644 --- a/include/sys/zfs_context.h +++ b/include/sys/zfs_context.h @@ -198,6 +198,7 @@ typedef struct zfs_kernel_param { } zfs_kernel_param_t; #define ZFS_MODULE_PARAM(scope_prefix, name_prefix, name, type, perm, desc) +#define ZFS_MODULE_PARAM_ARGS void #define ZFS_MODULE_PARAM_CALL(scope_prefix, name_prefix, name, setfunc, \ getfunc, perm, desc) |