summaryrefslogtreecommitdiffstats
path: root/include
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 /include
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 'include')
-rw-r--r--include/Makefile.in1
-rw-r--r--include/linux/Makefile.in1
-rw-r--r--include/sys/Makefile.in1
-rw-r--r--include/sys/dmu_tx.h6
-rw-r--r--include/sys/fm/Makefile.in1
-rw-r--r--include/sys/fm/fs/Makefile.in1
-rw-r--r--include/sys/fs/Makefile.in1
7 files changed, 9 insertions, 3 deletions
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@