/* * Debug logging is enabled by default for production kernel builds. * The overhead for this is negligible and the logs can be valuable when * debugging. For non-production user space builds all debugging except * logging is enabled since performance is no longer a concern. */ void zfs_dbgmsg_init(void) { if (zfs_flags == 0) { #if defined(_KERNEL) zfs_flags = ZFS_DEBUG_DPRINTF; spl_debug_set_mask(spl_debug_get_mask() | SD_DPRINTF); spl_debug_set_subsys(spl_debug_get_subsys() | SS_USER1); #else zfs_flags = ~ZFS_DEBUG_DPRINTF; #endif /* _KERNEL */ } }
/* * Debug logging is enabled by default for production kernel builds. * The overhead for this is negligible and the logs can be valuable when * debugging. For non-production user space builds all debugging except * logging is enabled since performance is no longer a concern. */ void zfs_dbgmsg_init(void) { #if !defined(_KERNEL) || !defined(__linux__) list_create(&zfs_dbgmsgs, sizeof (zfs_dbgmsg_t), offsetof(zfs_dbgmsg_t, zdm_node)); mutex_init(&zfs_dbgmsgs_lock, NULL, MUTEX_DEFAULT, NULL); #endif if (zfs_flags == 0) { #if defined(_KERNEL) zfs_flags = ZFS_DEBUG_DPRINTF; spl_debug_set_mask(spl_debug_get_mask() | SD_DPRINTF); spl_debug_set_subsys(spl_debug_get_subsys() | SS_USER1); #else zfs_flags = ~ZFS_DEBUG_DPRINTF; #endif /* _KERNEL */ } }