summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2018-08-20 16:41:53 -0400
committerBrian Behlendorf <[email protected]>2018-08-27 10:16:01 -0700
commit8c4fb36a24d4fd88382e454b13751a5adfea0806 (patch)
tree3ae994cb68fb807d391688c4fee13fa24656cc4c /include
parenta584ef26053065f486d46a7335bea222cb03eeea (diff)
Small rework of txg_list code
This patch simply adds some missing locking to the txg_list functions and refactors txg_verify() so that it is only compiled in for debug builds. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #7795
Diffstat (limited to 'include')
-rw-r--r--include/sys/txg.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/sys/txg.h b/include/sys/txg.h
index f52197781..ed0e7297c 100644
--- a/include/sys/txg.h
+++ b/include/sys/txg.h
@@ -133,6 +133,13 @@ extern void *txg_list_next(txg_list_t *tl, void *p, uint64_t txg);
/* Global tuning */
extern int zfs_txg_timeout;
+
+#ifdef ZFS_DEBUG
+#define TXG_VERIFY(spa, txg) txg_verify(spa, txg)
+#else
+#define TXG_VERIFY(spa, txg)
+#endif
+
#ifdef __cplusplus
}
#endif