mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
FreeBSD: Implement sysctl for fletcher4 impl
There is a tunable to select the fletcher 4 checksum implementation on Linux but it was not present in FreeBSD. Implement the sysctl handler for FreeBSD and use ZFS_MODULE_PARAM_CALL to provide the tunable on both platforms. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #11270
This commit is contained in:
committed by
Brian Behlendorf
parent
21adfb031c
commit
8847b06bf6
@@ -143,6 +143,17 @@ enum scope_prefix_types {
|
||||
MODULE_PARM_DESC(name_prefix ## name, desc)
|
||||
/* END CSTYLED */
|
||||
|
||||
/*
|
||||
* As above, but there is no variable with the name name_prefix ## name,
|
||||
* so NULL is passed to module_param_call instead.
|
||||
*/
|
||||
/* BEGIN CSTYLED */
|
||||
#define ZFS_MODULE_VIRTUAL_PARAM_CALL(scope_prefix, name_prefix, name, setfunc, getfunc, perm, desc) \
|
||||
CTASSERT_GLOBAL((sizeof (scope_prefix) == sizeof (enum scope_prefix_types))); \
|
||||
module_param_call(name_prefix ## name, setfunc, getfunc, NULL, perm); \
|
||||
MODULE_PARM_DESC(name_prefix ## name, desc)
|
||||
/* END CSTYLED */
|
||||
|
||||
#define ZFS_MODULE_PARAM_ARGS const char *buf, zfs_kernel_param_t *kp
|
||||
|
||||
#define ZFS_MODULE_DESCRIPTION(s) MODULE_DESCRIPTION(s)
|
||||
|
||||
Reference in New Issue
Block a user