]> granicus.if.org Git - zfs/commitdiff
OpenZFS 9682 - page fault in dsl_async_clone_destroy() while opening pool
authorSerapheim Dimitropoulos <serapheim@delphix.com>
Sun, 17 Jun 2018 00:39:14 +0000 (17:39 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 19 Oct 2018 19:06:21 +0000 (12:06 -0700)
Authored by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed by: Sara Hartse <sara.hartse@delphix.com>
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Approved by: Robert Mustacchi <rm@joyent.com>
Ported-by: George Melikov <mail@gmelikov.ru>
OpenZFS-issue: https://www.illumos.org/issues/9682
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/ade2c82828
Closes #8037

cmd/zdb/zdb.c
module/zfs/spa.c

index ad4ebe00a65eee1ee9955ce5fe9a98e776de7637..389bd7820a6b47e24afa0ff7421828fbf6cf9dbc 100644 (file)
@@ -2453,10 +2453,11 @@ dump_dir(objset_t *os)
        dmu_objset_name(os, osname);
 
        (void) printf("Dataset %s [%s], ID %llu, cr_txg %llu, "
-           "%s, %llu objects%s\n",
+           "%s, %llu objects%s%s\n",
            osname, type, (u_longlong_t)dmu_objset_id(os),
            (u_longlong_t)dds.dds_creation_txg,
-           numbuf, (u_longlong_t)usedobjs, blkbuf);
+           numbuf, (u_longlong_t)usedobjs, blkbuf,
+           (dds.dds_inconsistent) ? " (inconsistent)" : "");
 
        if (zopt_objects != 0) {
                for (i = 0; i < zopt_objects; i++)
index 3785981b7655476b092057bba113d8d3b64c5c1e..f0683b0b84612521a6467765dcf64322b832c8f7 100644 (file)
@@ -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");