mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 11:47:43 +03:00
OpenZFS 7254 - ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs
Authored by: Paul Dagnelie <pcd@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Prakash Surya <prakash.surya@delphix.com> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Steve Gonczi <steve.gonczi@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Ported-by: George Melikov <mail@gmelikov.ru> OpenZFS-issue: https://www.illumos.org/issues/7254 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c166b69 Closes #5670
This commit is contained in:
committed by
Brian Behlendorf
parent
687e612f9a
commit
cc9bb3e58e
@@ -1613,10 +1613,12 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t *tx)
|
||||
* If we actually created a non-clone, we need to create the
|
||||
* objset in our new dataset.
|
||||
*/
|
||||
rrw_enter(&newds->ds_bp_rwlock, RW_READER, FTAG);
|
||||
if (BP_IS_HOLE(dsl_dataset_get_blkptr(newds))) {
|
||||
(void) dmu_objset_create_impl(dp->dp_spa,
|
||||
newds, dsl_dataset_get_blkptr(newds), drrb->drr_type, tx);
|
||||
}
|
||||
rrw_exit(&newds->ds_bp_rwlock, FTAG);
|
||||
|
||||
drba->drba_cookie->drc_ds = newds;
|
||||
|
||||
@@ -1759,7 +1761,9 @@ dmu_recv_resume_begin_sync(void *arg, dmu_tx_t *tx)
|
||||
dmu_buf_will_dirty(ds->ds_dbuf, tx);
|
||||
dsl_dataset_phys(ds)->ds_flags |= DS_FLAG_INCONSISTENT;
|
||||
|
||||
rrw_enter(&ds->ds_bp_rwlock, RW_READER, FTAG);
|
||||
ASSERT(!BP_IS_HOLE(dsl_dataset_get_blkptr(ds)));
|
||||
rrw_exit(&ds->ds_bp_rwlock, FTAG);
|
||||
|
||||
drba->drba_cookie->drc_ds = ds;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user