summaryrefslogtreecommitdiffstats
path: root/zfs-modules.spec.in
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2012-03-20 16:00:17 -0700
committerBrian Behlendorf <[email protected]>2012-03-23 12:25:17 -0700
commit1c5de20ae2511124613926e4f780572634818218 (patch)
tree66e14fa7c95491068117fa977b7c3fd38dd4c315 /zfs-modules.spec.in
parent99ea23c583b272470a21e0ac7caa1f485f6b1125 (diff)
Add --enable-debug-dmu-tx configure option
Allow rigorous (and expensive) tx validation to be enabled/disabled indepentantly from the standard zfs debugging. When enabled these checks ensure that all txs are constructed properly and that a dbuf is never dirtied without taking the correct tx hold. This checking is particularly helpful when adding new dmu consumers like Lustre. However, for established consumers such as the zpl with no known outstanding tx construction problems this is just overhead. --enable-debug-dmu-tx - Enable/disable validation of each tx as --disable-debug-dmu-tx it is constructed. By default validation is disabled due to performance concerns. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'zfs-modules.spec.in')
-rw-r--r--zfs-modules.spec.in13
1 files changed, 12 insertions, 1 deletions
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