usr/src/uts/common/fs/zfs/txg.c
changeset 12296 7cf402a7f374
parent 11816 a30797f77200
child 12470 54258108784b
--- a/usr/src/uts/common/fs/zfs/txg.c	Mon May 03 11:16:14 2010 -0700
+++ b/usr/src/uts/common/fs/zfs/txg.c	Mon May 03 14:54:08 2010 -0700
@@ -19,8 +19,7 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
 #include <sys/zfs_context.h>
@@ -28,6 +27,7 @@
 #include <sys/dmu_impl.h>
 #include <sys/dmu_tx.h>
 #include <sys/dsl_pool.h>
+#include <sys/dsl_scan.h>
 #include <sys/callb.h>
 
 /*
@@ -136,7 +136,7 @@
 	 * 32-bit x86.  This is due in part to nested pools and
 	 * scrub_visitbp() recursion.
 	 */
-	tx->tx_sync_thread = thread_create(NULL, 12<<10, txg_sync_thread,
+	tx->tx_sync_thread = thread_create(NULL, 32<<10, txg_sync_thread,
 	    dp, 0, &p0, TS_RUN, minclsyspri);
 
 	mutex_exit(&tx->tx_sync_lock);
@@ -366,12 +366,12 @@
 		uint64_t txg;
 
 		/*
-		 * We sync when we're scrubbing, there's someone waiting
+		 * We sync when we're scanning, 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 ((dp->dp_scrub_func == SCRUB_FUNC_NONE ||
+		while ((dp->dp_scan->scn_phys.scn_state != DSS_SCANNING ||
 		    spa_load_state(spa) != SPA_LOAD_NONE ||
 		    spa_shutting_down(spa)) &&
 		    !tx->tx_exiting && timer > 0 &&