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 <behlendorf1@llnl.gov>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7795
This commit is contained in:
Tom Caputi
2018-08-20 16:41:53 -04:00
committed by Brian Behlendorf
parent a584ef2605
commit 8c4fb36a24
3 changed files with 54 additions and 23 deletions
+7
View File
@@ -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