diff --git a/.topdeps b/.topdeps index 607c231780..7f16cbcdd5 100644 --- a/.topdeps +++ b/.topdeps @@ -1,3 +1 @@ -gcc-branch -fix-branch -feature-branch +zfs-branch diff --git a/.topmsg b/.topmsg index 03967cdff5..12a0279afc 100644 --- a/.topmsg +++ b/.topmsg @@ -1,19 +1,6 @@ From: Brian Behlendorf -Subject: [PATCH] zfs branch +Subject: [PATCH] linux have spl debug -Merged result of all changes which are relevant to both Solaris -and Linux builds of the ZFS code. These are changes where there -is a reasonable chance they will be accepted upstream. - -Additionally, since this is effectively the root of the linux -ZFS tree the core linux build system is added here. This -includes autogen.sh, configure.ac, m4 macros, some scripts/*, -and makefiles for all the core ZFS components. Linux-only -features which require tweaks to the build system should appear -on the relevant topic branches. All autotools products which -result from autogen.sh are commited to the linux-configure-branch. - -This branch also contains the META, ChangeLog, AUTHORS, TODO, -and README, files. +Use spl debug if HAVE_SPL defined Signed-off-by: Brian Behlendorf diff --git a/module/zfs/include/sys/zfs_debug.h b/module/zfs/include/sys/zfs_debug.h index 02d9da1317..a8f0f186f4 100644 --- a/module/zfs/include/sys/zfs_debug.h +++ b/module/zfs/include/sys/zfs_debug.h @@ -57,11 +57,16 @@ extern int zfs_flags; #define ZFS_DEBUG_MODIFY 0x0010 #ifdef ZFS_DEBUG +#if defined(_KERNEL) && defined(HAVE_SPL) +#include +#define dprintf(...) CDEBUG_LIMIT(D_DPRINTF, __VA_ARGS__) +#else extern void __dprintf(const char *file, const char *func, int line, const char *fmt, ...); #define dprintf(...) \ if (zfs_flags & ZFS_DEBUG_DPRINTF) \ __dprintf(__FILE__, __func__, __LINE__, __VA_ARGS__) +#endif /* _KERNEL && HAVE_SPL */ #else #define dprintf(...) ((void)0) #endif /* ZFS_DEBUG */ diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c index 592adbd7da..345a4deadc 100644 --- a/module/zfs/spa_misc.c +++ b/module/zfs/spa_misc.c @@ -233,8 +233,13 @@ kmem_cache_t *spa_buffer_pool; int spa_mode_global; #ifdef ZFS_DEBUG +#if defined(_KERNEL) && defined(HAVE_SPL) +/* All filtering done by the SPL */ +int zfs_flags = ~0; +#else /* Everything except dprintf is on by default in debug builds */ int zfs_flags = ~ZFS_DEBUG_DPRINTF; +#endif #else int zfs_flags = 0; #endif