summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
Diffstat (limited to 'config')
-rw-r--r--config/rpm.am1
-rw-r--r--config/zfs-build.m423
2 files changed, 24 insertions, 0 deletions
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
])