summaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorNed Bass <[email protected]>2017-07-25 23:09:48 -0700
committerBrian Behlendorf <[email protected]>2017-07-25 23:09:48 -0700
commit8740cf4a2f5f7ff7fb6c214e0baf06356b2870b8 (patch)
treeb653cfe22dfd57e65f29206a0b73563811893414 /man
parent9ff13dbe921c7177faee3f10c832e88bded39920 (diff)
Add line info and SET_ERROR() to ZFS debug log
Redefine the SET_ERROR macro in terms of __dprintf() so the error return codes get logged as both tracepoint events (if tracepoints are enabled) and as ZFS debug log entries. This also allows us to use the same definition of SET_ERROR() in kernel and user space. Define a new debug flag ZFS_DEBUG_SET_ERROR=512 that may be bitwise or'd into zfs_flags. Setting this flag enables both dprintf() and SET_ERROR() messages in the debug log. That is, setting ZFS_DEBUG_SET_ERROR and ZFS_DEBUG_DPRINTF|ZFS_DEBUG_SET_ERROR are equivalent (this was done for sake of simplicity). Leaving ZFS_DEBUG_SET_ERROR unset suppresses the SET_ERROR() messages which helps avoid cluttering up the logs. To enable SET_ERROR() logging, run: echo 1 > /sys/module/zfs/parameters/zfs_dbgmsg_enable echo 512 > /sys/module/zfs/parameters/zfs_flags Remove the zfs_set_error_class tracepoints event class since SET_ERROR() now uses __dprintf(). This sacrifices a bit of granularity when selecting individual tracepoint events to enable but it makes the code simpler. Include file, function, and line number information in debug log entries. The information is now added to the message buffer in __dprintf() and as a result the zfs_dprintf_class tracepoints event class was changed from a 4 parameter interface to a single parameter. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ned Bass <[email protected]> Closes #6400
Diffstat (limited to 'man')
-rw-r--r--man/man5/zfs-module-parameters.56
1 files changed, 6 insertions, 0 deletions
diff --git a/man/man5/zfs-module-parameters.5 b/man/man5/zfs-module-parameters.5
index 0447debf7..f7bb2eb8c 100644
--- a/man/man5/zfs-module-parameters.5
+++ b/man/man5/zfs-module-parameters.5
@@ -1258,6 +1258,12 @@ _
_
128 ZFS_DEBUG_HISTOGRAM_VERIFY
Enable extra spacemap histogram verifications.
+_
+256 ZFS_DEBUG_METASLAB_VERIFY
+ Verify space accounting on disk matches in-core range_trees.
+_
+512 ZFS_DEBUG_SET_ERROR
+ Enable SET_ERROR and dprintf entries in the debug log.
.TE
.sp
* Requires debug build.