diff options
author | mm <mm@FreeBSD.org> | 2013-04-24 21:21:03 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2013-04-24 21:21:03 +0000 |
commit | e2d108deacec294a8f0cec29f767a5b9dad3ca23 (patch) | |
tree | f131a04a41d09c25fa6216b876cb117a565fb0c5 /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c | |
parent | df40a0e7efabf85cc2995e880b5da15ee78b748b (diff) | |
download | FreeBSD-src-e2d108deacec294a8f0cec29f767a5b9dad3ca23.zip FreeBSD-src-e2d108deacec294a8f0cec29f767a5b9dad3ca23.tar.gz |
MFV r249857:
Merge vendor bugfix for a possible deadlock related to async destroy
and improve write performance by introducing a new lock protecting
tx_open_txg.
Illumos ZFS issues:
3642 dsl_scan_active() should not issue I/O to determine if async
destroying is active
3643 txg_delay should not hold the tc_lock
MFC after: 1 week
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c index d465e71..efa5540 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c @@ -753,12 +753,16 @@ dsl_destroy_head_sync_impl(dsl_dataset_t *ds, dmu_tx_t *tx) zil_destroy_sync(dmu_objset_zil(os), tx); if (!spa_feature_is_active(dp->dp_spa, async_destroy)) { + dsl_scan_t *scn = dp->dp_scan; + spa_feature_incr(dp->dp_spa, async_destroy, tx); dp->dp_bptree_obj = bptree_alloc(mos, tx); VERIFY0(zap_add(mos, DMU_POOL_DIRECTORY_OBJECT, DMU_POOL_BPTREE_OBJ, sizeof (uint64_t), 1, &dp->dp_bptree_obj, tx)); + ASSERT(!scn->scn_async_destroying); + scn->scn_async_destroying = B_TRUE; } used = ds->ds_dir->dd_phys->dd_used_bytes; |