aboutsummaryrefslogtreecommitdiffstats
path: root/uts
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2019-06-03 17:06:02 +0000
committerAlexander Motin <mav@FreeBSD.org>2019-06-03 17:06:02 +0000
commitbb8cd94d19301471f5e3bdbc797e618ab6476e7d (patch)
tree78c16d8bd6c0a421fd9144cb9230fb47e819dd9f /uts
parent6cc531634499fb261585da1bd3a2344a201b3c34 (diff)
downloadsrc-bb8cd94d19301471f5e3bdbc797e618ab6476e7d.tar.gz
src-bb8cd94d19301471f5e3bdbc797e618ab6476e7d.zip
9682 page fault in dsl_async_clone_destroy() while opening pool
illumos/illumos-gate@ade2c82828f0dca1f46919aa1bd936ea1a5a0047 Reviewed by: Brad Lewis <brad.lewis@delphix.com> Reviewed by: Matt Ahrens <matt@delphix.com> Reviewed by: Sara Hartse <sara.hartse@delphix.com> Approved by: Robert Mustacchi <rm@joyent.com> Author: Serapheim Dimitropoulos <serapheim@delphix.com>
Notes
Notes: svn path=/vendor-sys/illumos/dist/; revision=348552
Diffstat (limited to 'uts')
-rw-r--r--uts/common/fs/zfs/spa.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/uts/common/fs/zfs/spa.c b/uts/common/fs/zfs/spa.c
index e531587f3a6a..b975e5939d16 100644
--- a/uts/common/fs/zfs/spa.c
+++ b/uts/common/fs/zfs/spa.c
@@ -3862,8 +3862,17 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, char **ereport)
*/
spa_history_log_version(spa, "open");
+ 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);
@@ -3873,10 +3882,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_config_enter(spa, SCL_CONFIG, FTAG, RW_READER);
vdev_initialize_restart(spa->spa_root_vdev);
spa_config_exit(spa, SCL_CONFIG, FTAG);