--- uts/common/fs/zfs/dmu_tx.c +++ uts/common/fs/zfs/dmu_tx.c @@ -1284,11 +1284,11 @@ return; /* If blkptr doesn't exist then add space to towrite */ - bp = &dn->dn_phys->dn_spill; - if (BP_IS_HOLE(bp)) { + if (!dn->dn_have_spill) { txh->txh_space_towrite += SPA_MAXBLOCKSIZE; txh->txh_space_tounref = 0; } else { + bp = &dn->dn_phys->dn_spill; if (dsl_dataset_block_freeable(dn->dn_objset->os_dsl_dataset, bp, bp->blk_birth)) txh->txh_space_tooverwrite += SPA_MAXBLOCKSIZE;