Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Sep 2014 12:07:26 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r271223 - vendor-sys/illumos/dist/uts/common/fs/zfs
Message-ID:  <201409071207.s87C7Q9n046260@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Sun Sep  7 12:07:26 2014
New Revision: 271223
URL: http://svnweb.freebsd.org/changeset/base/271223

Log:
  5117 space map reallocation can cause corruption
  Reviewed by: Matthew Ahrens <mahrens@delphix.com>
  Reviewed by: Sebastien Roy <sebastien.roy@delphix.com>
  Reviewed by: Richard Elling <richard.elling@gmail.com>
  Approved by: Richard Lowe <richlowe@richlowe.net>
  Author: George Wilson <george.wilson@delphix.com>
  
  illumos/illumos-gate@e503a685964805f048b35c2a4e70e0638344f2b7

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c	Sun Sep  7 11:57:08 2014	(r271222)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c	Sun Sep  7 12:07:26 2014	(r271223)
@@ -684,6 +684,11 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx)
 		return;
 	}
 
+	if (dn->dn_next_nlevels[txgoff]) {
+		dnode_increase_indirection(dn, tx);
+		dn->dn_next_nlevels[txgoff] = 0;
+	}
+
 	if (dn->dn_next_nblkptr[txgoff]) {
 		/* this should only happen on a realloc */
 		ASSERT(dn->dn_allocated_txg == tx->tx_txg);
@@ -708,11 +713,6 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx)
 		mutex_exit(&dn->dn_mtx);
 	}
 
-	if (dn->dn_next_nlevels[txgoff]) {
-		dnode_increase_indirection(dn, tx);
-		dn->dn_next_nlevels[txgoff] = 0;
-	}
-
 	dbuf_sync_list(list, tx);
 
 	if (!DMU_OBJECT_IS_SPECIAL(dn->dn_object)) {



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