Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Oct 2014 13:35:57 +0000 (UTC)
From:      Steven Hartland <smh@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org
Subject:   svn commit: r273215 - releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201410171335.s9HDZvSi052024@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: smh
Date: Fri Oct 17 13:35:56 2014
New Revision: 273215
URL: https://svnweb.freebsd.org/changeset/base/273215

Log:
  MFS10 r273161
  MFC r273158
  Prevent ZFS leaking pool free space
  
  Approved by:	re@ (gjb)
  Sponsored by:	Multiplay

Modified:
  releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
Directory Properties:
  releng/10.1/   (props changed)

Modified: releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
==============================================================================
--- releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c	Fri Oct 17 13:20:49 2014	(r273214)
+++ releng/10.1/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c	Fri Oct 17 13:35:56 2014	(r273215)
@@ -1468,13 +1468,6 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *
 			    "traverse_dataset_destroyed()", err);
 		}
 
-		/*
-		 * If we didn't make progress, mark the async destroy as
-		 * stalled, so that we will not initiate a spa_sync() on
-		 * its behalf.
-		 */
-		scn->scn_async_stalled = (scn->scn_visited_this_txg == 0);
-
 		if (bptree_is_empty(dp->dp_meta_objset, dp->dp_bptree_obj)) {
 			/* finished; deactivate async destroy feature */
 			spa_feature_decr(spa, SPA_FEATURE_ASYNC_DESTROY, tx);
@@ -1487,6 +1480,14 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *
 			    dp->dp_bptree_obj, tx));
 			dp->dp_bptree_obj = 0;
 			scn->scn_async_destroying = B_FALSE;
+		} else {
+			/*
+			 * If we didn't make progress, mark the async destroy as
+			 * stalled, so that we will not initiate a spa_sync() on
+			 * its behalf.
+			 */
+			scn->scn_async_stalled =
+			    (scn->scn_visited_this_txg == 0);
 		}
 	}
 	if (scn->scn_visited_this_txg) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410171335.s9HDZvSi052024>