Merge commit 'refs/remotes/origin/linux-have-spl-debug' into HEAD
This commit is contained in:
commit
393aa038a5
17
.topmsg
17
.topmsg
|
@ -1,19 +1,6 @@
|
|||
From: Brian Behlendorf <behlendorf1@llnl.gov>
|
||||
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 <behlendorf1@llnl.gov>
|
||||
|
|
|
@ -57,11 +57,16 @@ extern int zfs_flags;
|
|||
#define ZFS_DEBUG_MODIFY 0x0010
|
||||
|
||||
#ifdef ZFS_DEBUG
|
||||
#if defined(_KERNEL) && defined(HAVE_SPL)
|
||||
#include <sys/debug.h>
|
||||
#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 */
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue