diff options
author | Andriy Gapon <[email protected]> | 2016-11-21 15:09:54 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2017-02-24 11:05:33 -0800 |
commit | 0efd97912a14bcbc9dceae3de70b9ceaafcb12a9 (patch) | |
tree | 55b6383c93f6508e2afe4100d1dde1e2b2fea024 /module/zfs/dsl_pool.c | |
parent | 409b4127eea9bcf276f3bdaf5c2b8a907ccd1d59 (diff) |
OpenZFS 7199 - dsl_dataset_rollback_sync may try to free already free blocks
7200 no blocks must be born in a txg after a snaphot is created
Authored by: Andriy Gapon <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Brad Lewis <[email protected]>
Approved by: Gordon Ross <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Ported-by: George Melikov <[email protected]>
OpenZFS-issue: https://www.illumos.org/issues/7199
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/bfaed0b
Closes #5817
Diffstat (limited to 'module/zfs/dsl_pool.c')
-rw-r--r-- | module/zfs/dsl_pool.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/module/zfs/dsl_pool.c b/module/zfs/dsl_pool.c index 1b8b780aa..d1aeb8017 100644 --- a/module/zfs/dsl_pool.c +++ b/module/zfs/dsl_pool.c @@ -434,14 +434,6 @@ dsl_pool_mos_diduse_space(dsl_pool_t *dp, mutex_exit(&dp->dp_lock); } -static int -deadlist_enqueue_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx) -{ - dsl_deadlist_t *dl = arg; - dsl_deadlist_insert(dl, bp, tx); - return (0); -} - static void dsl_pool_sync_mos(dsl_pool_t *dp, dmu_tx_t *tx) { @@ -552,11 +544,7 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t txg) * - release hold from dsl_dataset_dirty() */ while ((ds = list_remove_head(&synced_datasets)) != NULL) { - ASSERTV(objset_t *os = ds->ds_objset); - bplist_iterate(&ds->ds_pending_deadlist, - deadlist_enqueue_cb, &ds->ds_deadlist, tx); - ASSERT(!dmu_objset_is_dirty(os, txg)); - dmu_buf_rele(ds->ds_dbuf, ds); + dsl_dataset_sync_done(ds, tx); } while ((dd = txg_list_remove(&dp->dp_dirty_dirs, txg)) != NULL) { |