diff options
author | Ryan Moeller <[email protected]> | 2020-08-01 00:25:35 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-31 21:25:35 -0700 |
commit | 0cc3454821879396c38d8c557ab918a70afd919b (patch) | |
tree | 26a08118f3587be4139a90a9879d1678dbcec761 /module/os | |
parent | af524bf7ff970c8dd70b3620b4ef6ee46441c27e (diff) |
Convert Linux-isms to FreeBSD-isms in platform zfs_debug.c
Change some comments copied from the Linux code to describe
the appropriate methods on FreeBSD.
Convert some tunables to ZFS_MODULE_PARAM so they get created
on FreeBSD.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ryan Moeller <[email protected]>
Closes #10647
Diffstat (limited to 'module/os')
-rw-r--r-- | module/os/freebsd/zfs/zfs_debug.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/module/os/freebsd/zfs/zfs_debug.c b/module/os/freebsd/zfs/zfs_debug.c index 2f5962b25..74742ad36 100644 --- a/module/os/freebsd/zfs/zfs_debug.c +++ b/module/os/freebsd/zfs/zfs_debug.c @@ -43,13 +43,10 @@ kstat_t *zfs_dbgmsg_kstat; * Internal ZFS debug messages are enabled by default. * * # Print debug messages - * cat /proc/spl/kstat/zfs/dbgmsg + * dtrace -n 'zfs-dbgmsg { print(stringof(arg0)); }' * * # Disable the kernel debug message log. - * echo 0 > /sys/module/zfs/parameters/zfs_dbgmsg_enable - * - * # Clear the kernel debug message log. - * echo 0 >/proc/spl/kstat/zfs/dbgmsg + * sysctl vfs.zfs.dbgmsg_enable=0 */ int zfs_dbgmsg_enable = 1; @@ -245,10 +242,10 @@ zfs_dbgmsg_print(const char *tag) } #endif /* _KERNEL */ -#ifdef _KERNEL -module_param(zfs_dbgmsg_enable, int, 0644); -MODULE_PARM_DESC(zfs_dbgmsg_enable, "Enable ZFS debug message log"); +/* BEGIN CSTYLED */ +ZFS_MODULE_PARAM(zfs, zfs_, dbgmsg_enable, INT, ZMOD_RW, + "Enable ZFS debug message log"); -module_param(zfs_dbgmsg_maxsize, int, 0644); -MODULE_PARM_DESC(zfs_dbgmsg_maxsize, "Maximum ZFS debug log size"); -#endif +ZFS_MODULE_PARAM(zfs, zfs_, dbgmsg_maxsize, INT, ZMOD_RW, + "Maximum ZFS debug log size"); +/* END CSTYLED */ |