diff options
62 files changed, 154 insertions, 25 deletions
diff --git a/Makefile.in b/Makefile.in index 077d318eb..ed37c99de 100644 --- a/Makefile.in +++ b/Makefile.in @@ -209,6 +209,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ @@ -964,6 +965,7 @@ rpm-common: --define "require_splobj $(SPL_OBJ)" \ --define "require_splver $(SPL_VERSION)" \ --define "$(DEBUG_ZFS) 1" \ + --define "$(DEBUG_DMU_TX) 1" \ --nodeps --rebuild $$rpmpkg || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ $(RM) -R $$rpmbuild diff --git a/cmd/Makefile.in b/cmd/Makefile.in index 76a5731a3..17cdb6fb9 100644 --- a/cmd/Makefile.in +++ b/cmd/Makefile.in @@ -169,6 +169,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/cmd/mount_zfs/Makefile.in b/cmd/mount_zfs/Makefile.in index ecc61d153..eec29d988 100644 --- a/cmd/mount_zfs/Makefile.in +++ b/cmd/mount_zfs/Makefile.in @@ -165,6 +165,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/cmd/sas_switch_id/Makefile.in b/cmd/sas_switch_id/Makefile.in index 375c65ec1..ba8a2d959 100644 --- a/cmd/sas_switch_id/Makefile.in +++ b/cmd/sas_switch_id/Makefile.in @@ -154,6 +154,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/cmd/zdb/Makefile.in b/cmd/zdb/Makefile.in index ae4e2c912..11191a08b 100644 --- a/cmd/zdb/Makefile.in +++ b/cmd/zdb/Makefile.in @@ -167,6 +167,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/cmd/zfs/Makefile.in b/cmd/zfs/Makefile.in index 4452a967f..1a6317e23 100644 --- a/cmd/zfs/Makefile.in +++ b/cmd/zfs/Makefile.in @@ -167,6 +167,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/cmd/zinject/Makefile.in b/cmd/zinject/Makefile.in index 5e200d1db..2937aad21 100644 --- a/cmd/zinject/Makefile.in +++ b/cmd/zinject/Makefile.in @@ -167,6 +167,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/cmd/zpios/Makefile.in b/cmd/zpios/Makefile.in index c7507a17d..c260ca672 100644 --- a/cmd/zpios/Makefile.in +++ b/cmd/zpios/Makefile.in @@ -161,6 +161,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/cmd/zpool/Makefile.in b/cmd/zpool/Makefile.in index 5775a4f29..1ce79855f 100644 --- a/cmd/zpool/Makefile.in +++ b/cmd/zpool/Makefile.in @@ -168,6 +168,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/cmd/zpool_id/Makefile.in b/cmd/zpool_id/Makefile.in index 3d51566ca..c5c523df2 100644 --- a/cmd/zpool_id/Makefile.in +++ b/cmd/zpool_id/Makefile.in @@ -154,6 +154,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/cmd/zpool_layout/Makefile.in b/cmd/zpool_layout/Makefile.in index 077f1d25e..f6d7679db 100644 --- a/cmd/zpool_layout/Makefile.in +++ b/cmd/zpool_layout/Makefile.in @@ -154,6 +154,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/cmd/ztest/Makefile.in b/cmd/ztest/Makefile.in index 405e496ee..8364639ec 100644 --- a/cmd/ztest/Makefile.in +++ b/cmd/ztest/Makefile.in @@ -167,6 +167,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/cmd/zvol_id/Makefile.in b/cmd/zvol_id/Makefile.in index 6f6688f7a..9e59035be 100644 --- a/cmd/zvol_id/Makefile.in +++ b/cmd/zvol_id/Makefile.in @@ -161,6 +161,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/config/rpm.am b/config/rpm.am index d557f77b4..41107d5ee 100644 --- a/config/rpm.am +++ b/config/rpm.am @@ -69,6 +69,7 @@ rpm-common: --define "require_splobj $(SPL_OBJ)" \ --define "require_splver $(SPL_VERSION)" \ --define "$(DEBUG_ZFS) 1" \ + --define "$(DEBUG_DMU_TX) 1" \ --nodeps --rebuild $$rpmpkg || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ $(RM) -R $$rpmbuild diff --git a/config/zfs-build.m4 b/config/zfs-build.m4 index c5983d3c3..6bfea5195 100644 --- a/config/zfs-build.m4 +++ b/config/zfs-build.m4 @@ -37,6 +37,29 @@ AC_DEFUN([ZFS_AC_DEBUG], [ AC_MSG_RESULT([$enable_debug]) ]) +AC_DEFUN([ZFS_AC_DEBUG_DMU_TX], [ + AC_ARG_ENABLE([debug-dmu-tx], + [AS_HELP_STRING([--enable-debug-dmu-tx], + [Enable dmu tx validation @<:@default=no@:>@])], + [], + [enable_debug_dmu_tx=no]) + + AS_IF([test "x$enable_debug_dmu_tx" = xyes], + [ + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_DMU_TX" + DEBUG_DMU_TX="_with_debug_dmu_tx" + AC_DEFINE([DEBUG_DMU_TX], [1], + [Define to 1 to enabled dmu tx validation]) + ], + [ + DEBUG_DMU_TX="_without_debug_dmu_tx" + ]) + + AC_SUBST(DEBUG_DMU_TX) + AC_MSG_CHECKING([whether dmu tx validation is enabled]) + AC_MSG_RESULT([$enable_debug_dmu_tx]) +]) + AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [ ZFS_AC_CONFIG_ALWAYS_NO_UNUSED_BUT_SET_VARIABLE ]) @@ -787,6 +787,7 @@ ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS +DEBUG_DMU_TX DEBUG_ZFS DEBUG_STACKFLAGS DEBUG_CFLAGS @@ -989,6 +990,7 @@ with_udevruledir with_blkid with_selinux enable_debug +enable_debug_dmu_tx ' ac_precious_vars='build_alias host_alias @@ -1642,6 +1644,7 @@ Optional Features: optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-debug Enable generic debug support [default=no] + --enable-debug-dmu-tx Enable dmu tx validation [default=no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -4836,13 +4839,13 @@ if test "${lt_cv_nm_interface+set}" = set; then else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:4839: $ac_compile\"" >&5) + (eval echo "\"\$as_me:4842: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:4842: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:4845: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:4845: output\"" >&5) + (eval echo "\"\$as_me:4848: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -6048,7 +6051,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 6051 "configure"' > conftest.$ac_ext + echo '#line 6054 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7901,11 +7904,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7904: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7907: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7908: \$? = $ac_status" >&5 + echo "$as_me:7911: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8240,11 +8243,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8243: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8246: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8247: \$? = $ac_status" >&5 + echo "$as_me:8250: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -8345,11 +8348,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8348: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8351: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8352: \$? = $ac_status" >&5 + echo "$as_me:8355: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -8400,11 +8403,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8403: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8406: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:8407: \$? = $ac_status" >&5 + echo "$as_me:8410: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -11203,7 +11206,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11206 "configure" +#line 11209 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11299,7 +11302,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11302 "configure" +#line 11305 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -24014,6 +24017,38 @@ fi $as_echo "$enable_debug" >&6; } + # Check whether --enable-debug-dmu-tx was given. +if test "${enable_debug_dmu_tx+set}" = set; then + enableval=$enable_debug_dmu_tx; +else + enable_debug_dmu_tx=no +fi + + + if test "x$enable_debug_dmu_tx" = xyes; then + + KERNELCPPFLAGS="${KERNELCPPFLAGS} -DDEBUG_DMU_TX" + DEBUG_DMU_TX="_with_debug_dmu_tx" + +cat >>confdefs.h <<\_ACEOF +#define DEBUG_DMU_TX 1 +_ACEOF + + +else + + DEBUG_DMU_TX="_without_debug_dmu_tx" + +fi + + + + { $as_echo "$as_me:$LINENO: checking whether dmu tx validation is enabled" >&5 +$as_echo_n "checking whether dmu tx validation is enabled... " >&6; } + { $as_echo "$as_me:$LINENO: result: $enable_debug_dmu_tx" >&5 +$as_echo "$enable_debug_dmu_tx" >&6; } + + ac_config_files="$ac_config_files Makefile dracut/Makefile dracut/90zfs/Makefile udev/Makefile udev/rules.d/Makefile etc/Makefile etc/init.d/Makefile etc/zfs/Makefile man/Makefile man/man8/Makefile lib/Makefile lib/libspl/Makefile lib/libspl/asm-generic/Makefile lib/libspl/asm-i386/Makefile lib/libspl/asm-x86_64/Makefile lib/libspl/include/Makefile lib/libspl/include/ia32/Makefile lib/libspl/include/ia32/sys/Makefile lib/libspl/include/rpc/Makefile lib/libspl/include/sys/Makefile lib/libspl/include/sys/sysevent/Makefile lib/libspl/include/sys/dktp/Makefile lib/libspl/include/util/Makefile lib/libavl/Makefile lib/libefi/Makefile lib/libnvpair/Makefile lib/libunicode/Makefile lib/libuutil/Makefile lib/libzpool/Makefile lib/libzfs/Makefile lib/libshare/Makefile cmd/Makefile cmd/zdb/Makefile cmd/zfs/Makefile cmd/zinject/Makefile cmd/zpool/Makefile cmd/ztest/Makefile cmd/zpios/Makefile cmd/mount_zfs/Makefile cmd/zpool_layout/Makefile cmd/zvol_id/Makefile cmd/zpool_id/Makefile cmd/sas_switch_id/Makefile module/Makefile module/avl/Makefile module/nvpair/Makefile module/unicode/Makefile module/zcommon/Makefile module/zfs/Makefile module/zpios/Makefile include/Makefile include/linux/Makefile include/sys/Makefile include/sys/fs/Makefile include/sys/fm/Makefile include/sys/fm/fs/Makefile scripts/Makefile scripts/zpios-profile/Makefile scripts/zpios-test/Makefile scripts/zpool-config/Makefile scripts/zpool-layout/Makefile scripts/common.sh zfs.spec zfs-modules.spec PKGBUILD-zfs PKGBUILD-zfs-modules zfs-script-config.sh" diff --git a/configure.ac b/configure.ac index f59ea9332..e0cb5a52d 100644 --- a/configure.ac +++ b/configure.ac @@ -52,6 +52,7 @@ ZFS_AC_LICENSE ZFS_AC_PACKAGE ZFS_AC_CONFIG ZFS_AC_DEBUG +ZFS_AC_DEBUG_DMU_TX AC_CONFIG_FILES([ Makefile diff --git a/dracut/90zfs/Makefile.in b/dracut/90zfs/Makefile.in index e34f65ac9..2b9907cbd 100644 --- a/dracut/90zfs/Makefile.in +++ b/dracut/90zfs/Makefile.in @@ -153,6 +153,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/dracut/Makefile.in b/dracut/Makefile.in index b8cc6ae61..fb9639ebd 100644 --- a/dracut/Makefile.in +++ b/dracut/Makefile.in @@ -169,6 +169,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/etc/Makefile.in b/etc/Makefile.in index 1187d0a2c..3b0556d92 100644 --- a/etc/Makefile.in +++ b/etc/Makefile.in @@ -169,6 +169,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/etc/init.d/Makefile.in b/etc/init.d/Makefile.in index 8eb130fa2..5879775f0 100644 --- a/etc/init.d/Makefile.in +++ b/etc/init.d/Makefile.in @@ -153,6 +153,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/etc/zfs/Makefile.in b/etc/zfs/Makefile.in index 73025a193..35bdc754a 100644 --- a/etc/zfs/Makefile.in +++ b/etc/zfs/Makefile.in @@ -153,6 +153,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/include/Makefile.in b/include/Makefile.in index e1817127a..b30a9708c 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -213,6 +213,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in index 3d4786775..28ead5737 100644 --- a/include/linux/Makefile.in +++ b/include/linux/Makefile.in @@ -160,6 +160,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/include/sys/Makefile.in b/include/sys/Makefile.in index a17957689..1e04ddfa7 100644 --- a/include/sys/Makefile.in +++ b/include/sys/Makefile.in @@ -340,6 +340,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/include/sys/dmu_tx.h b/include/sys/dmu_tx.h index d87a09bec..40c1ded5d 100644 --- a/include/sys/dmu_tx.h +++ b/include/sys/dmu_tx.h @@ -60,7 +60,7 @@ struct dmu_tx { list_t tx_callbacks; /* list of dmu_tx_callback_t on this dmu_tx */ uint8_t tx_anyobj; int tx_err; -#ifdef ZFS_DEBUG +#ifdef DEBUG_DMU_TX uint64_t tx_space_towrite; uint64_t tx_space_tofree; uint64_t tx_space_tooverwrite; @@ -91,7 +91,7 @@ typedef struct dmu_tx_hold { uint64_t txh_space_tounref; uint64_t txh_memory_tohold; uint64_t txh_fudge; -#ifdef ZFS_DEBUG +#ifdef DEBUG_DMU_TX enum dmu_tx_hold_type txh_type; uint64_t txh_arg1; uint64_t txh_arg2; @@ -160,7 +160,7 @@ void dmu_tx_dirty_buf(dmu_tx_t *tx, struct dmu_buf_impl *db); int dmu_tx_holds(dmu_tx_t *tx, uint64_t object); void dmu_tx_hold_space(dmu_tx_t *tx, uint64_t space); -#ifdef ZFS_DEBUG +#ifdef DEBUG_DMU_TX #define DMU_TX_DIRTY_BUF(tx, db) dmu_tx_dirty_buf(tx, db) #else #define DMU_TX_DIRTY_BUF(tx, db) diff --git a/include/sys/fm/Makefile.in b/include/sys/fm/Makefile.in index 5ae85a3a0..6f9b09c78 100644 --- a/include/sys/fm/Makefile.in +++ b/include/sys/fm/Makefile.in @@ -198,6 +198,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/include/sys/fm/fs/Makefile.in b/include/sys/fm/fs/Makefile.in index 5976245d7..684930c7f 100644 --- a/include/sys/fm/fs/Makefile.in +++ b/include/sys/fm/fs/Makefile.in @@ -158,6 +158,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/include/sys/fs/Makefile.in b/include/sys/fs/Makefile.in index 61f3125f4..2aa6bb2ae 100644 --- a/include/sys/fs/Makefile.in +++ b/include/sys/fs/Makefile.in @@ -158,6 +158,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/Makefile.in b/lib/Makefile.in index f40801f66..a507886b9 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -169,6 +169,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libavl/Makefile.in b/lib/libavl/Makefile.in index 5e31cc51a..b4fc5cd87 100644 --- a/lib/libavl/Makefile.in +++ b/lib/libavl/Makefile.in @@ -159,6 +159,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libefi/Makefile.in b/lib/libefi/Makefile.in index a2f425530..6329a7953 100644 --- a/lib/libefi/Makefile.in +++ b/lib/libefi/Makefile.in @@ -159,6 +159,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libnvpair/Makefile.in b/lib/libnvpair/Makefile.in index 773278483..374864432 100644 --- a/lib/libnvpair/Makefile.in +++ b/lib/libnvpair/Makefile.in @@ -185,6 +185,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libshare/Makefile.in b/lib/libshare/Makefile.in index e1c1a2ce2..77bb89a56 100644 --- a/lib/libshare/Makefile.in +++ b/lib/libshare/Makefile.in @@ -159,6 +159,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libspl/Makefile.in b/lib/libspl/Makefile.in index 2f94b5db6..22b9e5715 100644 --- a/lib/libspl/Makefile.in +++ b/lib/libspl/Makefile.in @@ -210,6 +210,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libspl/asm-generic/Makefile.in b/lib/libspl/asm-generic/Makefile.in index 66ec77b00..328d1104a 100644 --- a/lib/libspl/asm-generic/Makefile.in +++ b/lib/libspl/asm-generic/Makefile.in @@ -130,6 +130,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libspl/asm-i386/Makefile.in b/lib/libspl/asm-i386/Makefile.in index 4c9f37fd3..794fda90b 100644 --- a/lib/libspl/asm-i386/Makefile.in +++ b/lib/libspl/asm-i386/Makefile.in @@ -134,6 +134,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libspl/asm-x86_64/Makefile.in b/lib/libspl/asm-x86_64/Makefile.in index 845e2ab90..bce574f29 100644 --- a/lib/libspl/asm-x86_64/Makefile.in +++ b/lib/libspl/asm-x86_64/Makefile.in @@ -134,6 +134,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libspl/include/Makefile.in b/lib/libspl/include/Makefile.in index d9f694485..c5a949ffb 100644 --- a/lib/libspl/include/Makefile.in +++ b/lib/libspl/include/Makefile.in @@ -194,6 +194,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libspl/include/ia32/Makefile.in b/lib/libspl/include/ia32/Makefile.in index abb9a7b24..7efb41e21 100644 --- a/lib/libspl/include/ia32/Makefile.in +++ b/lib/libspl/include/ia32/Makefile.in @@ -169,6 +169,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libspl/include/ia32/sys/Makefile.in b/lib/libspl/include/ia32/sys/Makefile.in index a7e3f3cd9..f774123ce 100644 --- a/lib/libspl/include/ia32/sys/Makefile.in +++ b/lib/libspl/include/ia32/sys/Makefile.in @@ -156,6 +156,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libspl/include/rpc/Makefile.in b/lib/libspl/include/rpc/Makefile.in index 6c3174da9..8d08d442d 100644 --- a/lib/libspl/include/rpc/Makefile.in +++ b/lib/libspl/include/rpc/Makefile.in @@ -156,6 +156,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libspl/include/sys/Makefile.in b/lib/libspl/include/sys/Makefile.in index b226c8d4b..4e94d4389 100644 --- a/lib/libspl/include/sys/Makefile.in +++ b/lib/libspl/include/sys/Makefile.in @@ -194,6 +194,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libspl/include/sys/dktp/Makefile.in b/lib/libspl/include/sys/dktp/Makefile.in index aa63471b7..2130c3b12 100644 --- a/lib/libspl/include/sys/dktp/Makefile.in +++ b/lib/libspl/include/sys/dktp/Makefile.in @@ -156,6 +156,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libspl/include/sys/sysevent/Makefile.in b/lib/libspl/include/sys/sysevent/Makefile.in index 29861385d..533d5a54c 100644 --- a/lib/libspl/include/sys/sysevent/Makefile.in +++ b/lib/libspl/include/sys/sysevent/Makefile.in @@ -156,6 +156,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libspl/include/util/Makefile.in b/lib/libspl/include/util/Makefile.in index bb71a90d6..adbc3a7ff 100644 --- a/lib/libspl/include/util/Makefile.in +++ b/lib/libspl/include/util/Makefile.in @@ -156,6 +156,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libunicode/Makefile.in b/lib/libunicode/Makefile.in index 0b99b01a9..063ce39d0 100644 --- a/lib/libunicode/Makefile.in +++ b/lib/libunicode/Makefile.in @@ -159,6 +159,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libuutil/Makefile.in b/lib/libuutil/Makefile.in index 5e87e0114..dbd6aa035 100644 --- a/lib/libuutil/Makefile.in +++ b/lib/libuutil/Makefile.in @@ -188,6 +188,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libzfs/Makefile.in b/lib/libzfs/Makefile.in index 5fc0ed98e..48202c07c 100644 --- a/lib/libzfs/Makefile.in +++ b/lib/libzfs/Makefile.in @@ -189,6 +189,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/lib/libzpool/Makefile.in b/lib/libzpool/Makefile.in index d357fdd9e..09073fe33 100644 --- a/lib/libzpool/Makefile.in +++ b/lib/libzpool/Makefile.in @@ -201,6 +201,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/man/Makefile.in b/man/Makefile.in index fb691d05b..aeac86d67 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -169,6 +169,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/man/man8/Makefile.in b/man/man8/Makefile.in index c8f015d10..2871d4b3c 100644 --- a/man/man8/Makefile.in +++ b/man/man8/Makefile.in @@ -154,6 +154,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/module/zfs/dmu_tx.c b/module/zfs/dmu_tx.c index 5f333ab96..50207bdbb 100644 --- a/module/zfs/dmu_tx.c +++ b/module/zfs/dmu_tx.c @@ -68,7 +68,7 @@ dmu_tx_create_dd(dsl_dir_t *dd) offsetof(dmu_tx_hold_t, txh_node)); list_create(&tx->tx_callbacks, sizeof (dmu_tx_callback_t), offsetof(dmu_tx_callback_t, dcb_node)); -#ifdef ZFS_DEBUG +#ifdef DEBUG_DMU_TX refcount_create(&tx->tx_space_written); refcount_create(&tx->tx_space_freed); #endif @@ -141,7 +141,7 @@ dmu_tx_hold_object_impl(dmu_tx_t *tx, objset_t *os, uint64_t object, txh = kmem_zalloc(sizeof (dmu_tx_hold_t), KM_SLEEP); txh->txh_tx = tx; txh->txh_dnode = dn; -#ifdef ZFS_DEBUG +#ifdef DEBUG_DMU_TX txh->txh_type = type; txh->txh_arg1 = arg1; txh->txh_arg2 = arg2; @@ -798,7 +798,7 @@ dmu_tx_holds(dmu_tx_t *tx, uint64_t object) return (holds); } -#ifdef ZFS_DEBUG +#ifdef DEBUG_DMU_TX void dmu_tx_dirty_buf(dmu_tx_t *tx, dmu_buf_impl_t *db) { @@ -1004,7 +1004,7 @@ dmu_tx_try_assign(dmu_tx_t *tx, uint64_t txg_how) /* calculate memory footprint estimate */ memory = towrite + tooverwrite + tohold; -#ifdef ZFS_DEBUG +#ifdef DEBUG_DMU_TX /* * Add in 'tohold' to account for our dirty holds on this memory * XXX - the "fudge" factor is to account for skipped blocks that @@ -1130,7 +1130,7 @@ dmu_tx_wait(dmu_tx_t *tx) void dmu_tx_willuse_space(dmu_tx_t *tx, int64_t delta) { -#ifdef ZFS_DEBUG +#ifdef DEBUG_DMU_TX if (tx->tx_dir == NULL || delta == 0) return; @@ -1180,7 +1180,7 @@ dmu_tx_commit(dmu_tx_t *tx) list_destroy(&tx->tx_callbacks); list_destroy(&tx->tx_holds); -#ifdef ZFS_DEBUG +#ifdef DEBUG_DMU_TX dprintf("towrite=%llu written=%llu tofree=%llu freed=%llu\n", tx->tx_space_towrite, refcount_count(&tx->tx_space_written), tx->tx_space_tofree, refcount_count(&tx->tx_space_freed)); @@ -1216,7 +1216,7 @@ dmu_tx_abort(dmu_tx_t *tx) list_destroy(&tx->tx_callbacks); list_destroy(&tx->tx_holds); -#ifdef ZFS_DEBUG +#ifdef DEBUG_DMU_TX refcount_destroy_many(&tx->tx_space_written, refcount_count(&tx->tx_space_written)); refcount_destroy_many(&tx->tx_space_freed, diff --git a/scripts/Makefile.in b/scripts/Makefile.in index c6a49f6c1..a16ab5974 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -194,6 +194,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/scripts/zpios-profile/Makefile.in b/scripts/zpios-profile/Makefile.in index 684530d42..bc0cee0c9 100644 --- a/scripts/zpios-profile/Makefile.in +++ b/scripts/zpios-profile/Makefile.in @@ -154,6 +154,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/scripts/zpios-test/Makefile.in b/scripts/zpios-test/Makefile.in index c9cb7c2ee..54f55c62c 100644 --- a/scripts/zpios-test/Makefile.in +++ b/scripts/zpios-test/Makefile.in @@ -154,6 +154,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/scripts/zpool-config/Makefile.in b/scripts/zpool-config/Makefile.in index db4b29c3b..22867ed1b 100644 --- a/scripts/zpool-config/Makefile.in +++ b/scripts/zpool-config/Makefile.in @@ -154,6 +154,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/scripts/zpool-layout/Makefile.in b/scripts/zpool-layout/Makefile.in index 036f48c3b..54285b9f4 100644 --- a/scripts/zpool-layout/Makefile.in +++ b/scripts/zpool-layout/Makefile.in @@ -154,6 +154,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/udev/Makefile.in b/udev/Makefile.in index 49ca53aa3..9506bb96e 100644 --- a/udev/Makefile.in +++ b/udev/Makefile.in @@ -169,6 +169,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/udev/rules.d/Makefile.in b/udev/rules.d/Makefile.in index 84693adba..dbb126f5f 100644 --- a/udev/rules.d/Makefile.in +++ b/udev/rules.d/Makefile.in @@ -153,6 +153,7 @@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ +DEBUG_DMU_TX = @DEBUG_DMU_TX@ DEBUG_STACKFLAGS = @DEBUG_STACKFLAGS@ DEBUG_ZFS = @DEBUG_ZFS@ DEFAULT_INIT_DIR = @DEFAULT_INIT_DIR@ diff --git a/zfs-modules.spec.in b/zfs-modules.spec.in index f1db8c3a6..220b1c11e 100644 --- a/zfs-modules.spec.in +++ b/zfs-modules.spec.in @@ -33,6 +33,17 @@ %endif %endif +# Set using 'rpmbuild ... --with debug-dmu-tx ...', defaults to disabled. +%if %{defined _with_debug_dmu_tx} + %define kdebug_dmu_tx --enable-debug-dmu-tx +%else + %if %{defined _without_debug_dmu_tx} + %define kdebug_dmu_tx --disable-debug-dmu-tx + %else + %define kdebug_dmu_tx --disable-debug-dmu-tx + %endif +%endif + # SLES: %if %{defined suse_version} %if %{undefined kver} @@ -264,7 +275,7 @@ which use %{name}. %build %configure --with-linux=%{kdir} --with-linux-obj=%{kobj} \ --with-spl=%{spldir} --with-spl-obj=%{splobj} \ - --with-config=kernel %{kdebug} + --with-config=kernel %{kdebug} %{kdebug_dmu_tx} make %install diff --git a/zfs_config.h.in b/zfs_config.h.in index 234e4e44e..d39855122 100644 --- a/zfs_config.h.in +++ b/zfs_config.h.in @@ -1,5 +1,8 @@ /* zfs_config.h.in. Generated from configure.ac by autoheader. */ +/* Define to 1 to enabled dmu tx validation */ +#undef DEBUG_DMU_TX + /* invalidate_bdev() wants 1 arg */ #undef HAVE_1ARG_INVALIDATE_BDEV |