diff options
author | Serapheim Dimitropoulos <[email protected]> | 2018-06-16 17:39:14 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-10-19 12:06:21 -0700 |
commit | 9b2266e3d80994b21c452f67856010b566420831 (patch) | |
tree | fd37ec02e9bef4e37cc41509e2ab390bf79d565b /module | |
parent | ee900344f2f81cd3cc8dda95e8e8e41497d58001 (diff) |
OpenZFS 9682 - page fault in dsl_async_clone_destroy() while opening pool
Authored by: Serapheim Dimitropoulos <[email protected]>
Reviewed by: Brad Lewis <[email protected]>
Reviewed by: Matt Ahrens <[email protected]>
Reviewed by: Sara Hartse <[email protected]>
Reviewed by: Brian Behlendorf <[email protected]>
Approved by: Robert Mustacchi <[email protected]>
Ported-by: George Melikov <[email protected]>
OpenZFS-issue: https://www.illumos.org/issues/9682
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/ade2c82828
Closes #8037
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/spa.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/module/zfs/spa.c b/module/zfs/spa.c index 3785981b7..f0683b0b8 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -4226,8 +4226,17 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, char **ereport) */ spa_history_log_version(spa, "open", NULL); + spa_restart_removal(spa); + spa_spawn_aux_threads(spa); + /* * Delete any inconsistent datasets. + * + * Note: + * Since we may be issuing deletes for clones here, + * we make sure to do so after we've spawned all the + * auxiliary threads above (from which the livelist + * deletion zthr is part of). */ (void) dmu_objset_find(spa_name(spa), dsl_destroy_inconsistent, NULL, DS_FIND_CHILDREN); @@ -4237,9 +4246,6 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, char **ereport) */ dsl_pool_clean_tmp_userrefs(spa->spa_dsl_pool); - spa_restart_removal(spa); - - spa_spawn_aux_threads(spa); } spa_load_note(spa, "LOADED"); |