svn commit: r252761 - in stable/8: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Xin LI delphij at FreeBSD.org
Fri Jul 5 03:55:14 UTC 2013


Author: delphij
Date: Fri Jul  5 03:55:13 2013
New Revision: 252761
URL: http://svnweb.freebsd.org/changeset/base/252761

Log:
  MFC r251635: illumos #3747 txg commit callbacks don't work
  
  sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c:
  	Fix commit callbacks by moving them to the task's list.
  	Previously, list_move_tail() returned without doing anything because
  	the task list was passed as the source rather than destination.
  
  cddl/contrib/opensolaris/cmd/ztest/ztest.c:
  	Check the commit callback threshold correctly.
  
  Submitted by:	will
  Reviewed by:	Matthew Ahrens <mahrens at delphix.com>,
  		Christopher Siden <christopher.siden at delphix.com>
  Sponsored by:	Spectra Logic

Modified:
  stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c
  stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
Directory Properties:
  stable/8/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/   (props changed)
  stable/8/sys/cddl/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)

Modified: stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c
==============================================================================
--- stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Fri Jul  5 03:54:13 2013	(r252760)
+++ stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c	Fri Jul  5 03:55:13 2013	(r252761)
@@ -4509,7 +4509,7 @@ ztest_dmu_commit_callbacks(ztest_ds_t *z
 	 */
 	tmp_cb = list_head(&zcl.zcl_callbacks);
 	if (tmp_cb != NULL &&
-	    tmp_cb->zcd_txg > txg - ZTEST_COMMIT_CALLBACK_THRESH) {
+	    (txg - ZTEST_COMMIT_CALLBACK_THRESH) > tmp_cb->zcd_txg) {
 		fatal(0, "Commit callback threshold exceeded, oldest txg: %"
 		    PRIu64 ", open txg: %" PRIu64 "\n", tmp_cb->zcd_txg, txg);
 	}

Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c
==============================================================================
--- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c	Fri Jul  5 03:54:13 2013	(r252760)
+++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/txg.c	Fri Jul  5 03:55:13 2013	(r252761)
@@ -370,7 +370,7 @@ txg_dispatch_callbacks(dsl_pool_t *dp, u
 		list_create(cb_list, sizeof (dmu_tx_callback_t),
 		    offsetof(dmu_tx_callback_t, dcb_node));
 
-		list_move_tail(&tc->tc_callbacks[g], cb_list);
+		list_move_tail(cb_list, &tc->tc_callbacks[g]);
 
 		(void) taskq_dispatch(tx->tx_commit_cb_taskq, (task_func_t *)
 		    txg_do_callbacks, cb_list, TQ_SLEEP);


More information about the svn-src-all mailing list