]> git.proxmox.com Git - mirror_zfs.git/commit - include/sys/zfs_debug.h
enable zfs_dbgmsg() by default, without dprintf()
authorMatthew Ahrens <mahrens@delphix.com>
Wed, 21 Mar 2018 22:37:32 +0000 (15:37 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 21 Mar 2018 22:37:32 +0000 (15:37 -0700)
commit2fd92c3d6c7fba9a28ce4779ff6623dc911e7b78
tree9eaa716acdd15e77999f15d0d72a60cfb2b228d1
parent8d9e7c8fbe6e131fac64c16c0714e5120d012daa
enable zfs_dbgmsg() by default, without dprintf()

zfs_dbgmsg() should record a message by default.  As a general
principal, these messages shouldn't be too verbose.  Furthermore, the
amount of memory used is limited to 4MB (by default).

dprintf() should only record a message if this is a debug build, and
ZFS_DEBUG_DPRINTF is set in zfs_flags.  This flag is not set by default
(even on debug builds).  These messages are extremely verbose, and
sometimes nontrivial to compute.

SET_ERROR() should only record a message if ZFS_DEBUG_SET_ERROR is set
in zfs_flags.  This flag is not set by default (even on debug builds).

This brings our behavior in line with illumos.  Note that the message
format is unchanged (including file, line, and function, even though
these are not recorded on illumos).

Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Prakash Surya <prakash.surya@delphix.com>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #7314
include/sys/zfs_debug.h
module/zfs/arc.c
module/zfs/dmu_send.c
module/zfs/spa_misc.c
module/zfs/zfs_debug.c