From 5f087dda784b26f16e72eff32c0e2c2b7c483adb Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Tue, 18 Feb 2020 14:22:56 -0500 Subject: Enable zpool events tunables and tests on FreeBSD We have have made the necessary changes in our module code to expose zevents through both devd and the zpool events ioctl. Now the tunables can be exposed and zpool events tests can be enabled on both platforms. A few minor tweaks to the tests were needed to accommodate the way wc formats output on FreeBSD. zed remains to be ported. Reviewed-by: Brian Behlendorf Signed-off-by: Ryan Moeller Closes #10008 --- module/zfs/fm.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'module') diff --git a/module/zfs/fm.c b/module/zfs/fm.c index e3c3a1700..c00e08b8d 100644 --- a/module/zfs/fm.c +++ b/module/zfs/fm.c @@ -1607,9 +1607,7 @@ fm_erpt_dropped_increment(void) { atomic_inc_64(&ratelimit_dropped); } -#endif -#ifdef _KERNEL void fm_init(void) { @@ -1664,14 +1662,13 @@ fm_fini(void) fm_ksp = NULL; } } +#endif /* _KERNEL */ -module_param(zfs_zevent_len_max, int, 0644); -MODULE_PARM_DESC(zfs_zevent_len_max, "Max event queue length"); - -module_param(zfs_zevent_cols, int, 0644); -MODULE_PARM_DESC(zfs_zevent_cols, "Max event column width"); +ZFS_MODULE_PARAM(zfs_zevent, zfs_zevent_, len_max, INT, ZMOD_RW, + "Max event queue length"); -module_param(zfs_zevent_console, int, 0644); -MODULE_PARM_DESC(zfs_zevent_console, "Log events to the console"); +ZFS_MODULE_PARAM(zfs_zevent, zfs_zevent_, cols, INT, ZMOD_RW, + "Max event column width"); -#endif /* _KERNEL */ +ZFS_MODULE_PARAM(zfs_zevent, zfs_zevent_, console, INT, ZMOD_RW, + "Log events to the console"); -- cgit v1.2.3