summaryrefslogtreecommitdiffstats
path: root/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2010-05-13 20:32:56 +0000
committermm <mm@FreeBSD.org>2010-05-13 20:32:56 +0000
commit6f4ba1587b481253ce8265f50114ebe438759779 (patch)
tree1cb19e0cf3e413fa2f84c4f8c268f6161be50805 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
parentcdb02238eea11b2e4495d0b09780e3669bce9e4c (diff)
downloadFreeBSD-src-6f4ba1587b481253ce8265f50114ebe438759779.zip
FreeBSD-src-6f4ba1587b481253ce8265f50114ebe438759779.tar.gz
Import OpenSolaris revision 7837:001de5627df3
It includes the following changes: - parallel reads in traversal code (Bug ID 6333409) - faster traversal for zfs send (Bug ID 6418042) - traversal code cleanup (Bug ID 6725675) - fix for two scrub related bugs (Bug ID 6729696, 6730101) - fix assertion in dbuf_verify (Bug ID 6752226) - fix panic during zfs send with i/o errors (Bug ID 6577985) - replace P2CROSS with P2BOUNDARY (Bug ID 6725680) List of OpenSolaris Bug IDs: 6333409, 6418042, 6757112, 6725668, 6725675, 6725680, 6725698, 6729696, 6730101, 6752226, 6577985, 6755042 Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (multiple Bug IDs) MFC after: 1 week
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
index 8650fa1..da1e83e 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
@@ -309,12 +309,14 @@ txg_sync_thread(void *arg)
uint64_t txg;
/*
- * We sync when there's someone waiting on us, or the
- * quiesce thread has handed off a txg to us, or we have
- * reached our timeout.
+ * We sync when we're scrubbing, there's someone waiting
+ * on us, or the quiesce thread has handed off a txg to
+ * us, or we have reached our timeout.
*/
timer = (delta >= timeout ? 0 : timeout - delta);
- while (!tx->tx_exiting && timer > 0 &&
+ while ((dp->dp_scrub_func == SCRUB_FUNC_NONE ||
+ spa_shutting_down(dp->dp_spa)) &&
+ !tx->tx_exiting && timer > 0 &&
tx->tx_synced_txg >= tx->tx_sync_txg_waiting &&
tx->tx_quiesced_txg == 0) {
dprintf("waiting; tx_synced=%llu waiting=%llu dp=%p\n",
OpenPOWER on IntegriCloud