mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 02:49:32 +03:00
Illumos 5117 - spacemap reallocation can cause corruption
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> References: https://www.illumos.org/projects/illumos-gate/issues/5117 https://github.com/illumos/illumos-gate/commit/e503a68 Ported by: Turbo Fredriksson <turbo@bayour.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2662
This commit is contained in:
parent
ceb49b0acd
commit
4f68d7878f
@ -695,6 +695,11 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dn->dn_next_nlevels[txgoff]) {
|
||||||
|
dnode_increase_indirection(dn, tx);
|
||||||
|
dn->dn_next_nlevels[txgoff] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (dn->dn_next_nblkptr[txgoff]) {
|
if (dn->dn_next_nblkptr[txgoff]) {
|
||||||
/* this should only happen on a realloc */
|
/* this should only happen on a realloc */
|
||||||
ASSERT(dn->dn_allocated_txg == tx->tx_txg);
|
ASSERT(dn->dn_allocated_txg == tx->tx_txg);
|
||||||
@ -720,11 +725,6 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx)
|
|||||||
mutex_exit(&dn->dn_mtx);
|
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);
|
dbuf_sync_list(list, tx);
|
||||||
|
|
||||||
if (!DMU_OBJECT_IS_SPECIAL(dn->dn_object)) {
|
if (!DMU_OBJECT_IS_SPECIAL(dn->dn_object)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user