diff options
author | Andriy Gapon <[email protected]> | 2018-02-21 14:55:55 +0200 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-03-30 12:00:40 -0700 |
commit | 5e00213e430fe9103e263514490d55d10075908e (patch) | |
tree | 7447d888344a6afcf29932f84dfd0b5bc8490d8d /module/zfs/dmu_objset.c | |
parent | 99f505a4d743976d8879595d20beb66a6cbc3af1 (diff) |
OpenZFS 9164 - assert: newds == os->os_dsl_dataset
Authored by: Andriy Gapon <[email protected]>
Reviewed by: Matt Ahrens <[email protected]>
Reviewed by: Don Brady <[email protected]>
Reviewed-by: loli10K <[email protected]>
Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Approved by: Richard Lowe <[email protected]>
Ported-by: Giuseppe Di Natale <[email protected]>
Porting Notes:
* Re-enabled and tweaked the zpool_upgrade_007_pos test case
to successfully run in under 5 minutes.
OpenZFS-issue: https://www.illumos.org/issues/9164
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/0e776dc06a
Closes #6112
Closes #7336
Diffstat (limited to 'module/zfs/dmu_objset.c')
-rw-r--r-- | module/zfs/dmu_objset.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c index c2dd31a8b..de7bbf894 100644 --- a/module/zfs/dmu_objset.c +++ b/module/zfs/dmu_objset.c @@ -791,24 +791,22 @@ dmu_objset_rele(objset_t *os, void *tag) * same name so that it can be partially torn down and reconstructed. */ void -dmu_objset_refresh_ownership(objset_t *os, boolean_t decrypt, void *tag) +dmu_objset_refresh_ownership(dsl_dataset_t *ds, dsl_dataset_t **newds, + boolean_t decrypt, void *tag) { dsl_pool_t *dp; - dsl_dataset_t *ds, *newds; char name[ZFS_MAX_DATASET_NAME_LEN]; - ds = os->os_dsl_dataset; VERIFY3P(ds, !=, NULL); VERIFY3P(ds->ds_owner, ==, tag); VERIFY(dsl_dataset_long_held(ds)); dsl_dataset_name(ds, name); - dp = dmu_objset_pool(os); + dp = ds->ds_dir->dd_pool; dsl_pool_config_enter(dp, FTAG); - dmu_objset_disown(os, decrypt, tag); + dsl_dataset_disown(ds, decrypt, tag); VERIFY0(dsl_dataset_own(dp, name, - (decrypt) ? DS_HOLD_FLAG_DECRYPT : 0, tag, &newds)); - VERIFY3P(newds, ==, os->os_dsl_dataset); + (decrypt) ? DS_HOLD_FLAG_DECRYPT : 0, tag, newds)); dsl_pool_config_exit(dp, FTAG); } |