svn commit: r271223 - vendor-sys/illumos/dist/uts/common/fs/zfs

Xin LI delphij at FreeBSD.org
Sun Sep 7 12:07:27 UTC 2014


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 at delphix.com>
  Reviewed by: Sebastien Roy <sebastien.roy at delphix.com>
  Reviewed by: Richard Elling <richard.elling at gmail.com>
  Approved by: Richard Lowe <richlowe at richlowe.net>
  Author: George Wilson <george.wilson at delphix.com>
  
  illumos/illumos-gate at 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)) {


More information about the svn-src-all mailing list