Date: Sun, 7 Sep 2014 13:13:43 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271226 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201409071313.s87DDhCs079901@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Sun Sep 7 13:13:42 2014 New Revision: 271226 URL: http://svnweb.freebsd.org/changeset/base/271226 Log: MFV r271223: In dnode_sync(), do dnode_increase_indirection() before processing the dn_next_nblkptr. Illumos issue: 5117 space map reallocation can cause corruption MFC after: 3 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Sun Sep 7 12:18:12 2014 (r271225) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Sun Sep 7 13:13:42 2014 (r271226) @@ -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?201409071313.s87DDhCs079901>