Date: Mon, 6 Jul 2015 08:24:57 +0000 (UTC) From: Andriy Gapon <avg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r285197 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201507060824.t668Ovda005578@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avg Date: Mon Jul 6 08:24:57 2015 New Revision: 285197 URL: https://svnweb.freebsd.org/changeset/base/285197 Log: MFC r271226: MFV r271223: 5117 space map reallocation can cause corruption In dnode_sync(), do dnode_increase_indirection() before processing. Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Jul 6 05:57:41 2015 (r285196) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Mon Jul 6 08:24:57 2015 (r285197) @@ -688,6 +688,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); @@ -712,11 +717,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?201507060824.t668Ovda005578>