summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2014-09-10 13:21:44 +0000
committerdelphij <delphij@FreeBSD.org>2014-09-10 13:21:44 +0000
commit692154fe89c88e5be49b1529dce6d92bff79de07 (patch)
tree806138d1566997e3335f51357987211a9290362e /sys/cddl
parent81bb44f92541d95b67e56d8182747296a198065c (diff)
downloadFreeBSD-src-692154fe89c88e5be49b1529dce6d92bff79de07.zip
FreeBSD-src-692154fe89c88e5be49b1529dce6d92bff79de07.tar.gz
MFC r271226: MFV r271223:
In dnode_sync(), do dnode_increase_indirection() before processing the dn_next_nblkptr. Illumos issue: 5117 space map reallocation can cause corruption Approved by: re (gjb)
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
index ff666b2..2a57aee 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c
@@ -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)) {
OpenPOWER on IntegriCloud