Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Jun 2019 17:56:44 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348564 - in head: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201906031756.x53Huidj052092@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Jun  3 17:56:44 2019
New Revision: 348564
URL: https://svnweb.freebsd.org/changeset/base/348564

Log:
  MFV r348552: 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>

Modified:
  head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
Directory Properties:
  head/cddl/contrib/opensolaris/   (props changed)
  head/cddl/contrib/opensolaris/cmd/zdb/   (props changed)
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c
==============================================================================
--- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c	Mon Jun  3 17:44:47 2019	(r348563)
+++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c	Mon Jun  3 17:56:44 2019	(r348564)
@@ -2271,10 +2271,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++)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Mon Jun  3 17:44:47 2019	(r348563)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Mon Jun  3 17:56:44 2019	(r348564)
@@ -3953,8 +3953,17 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, char
 		 */
 		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);
@@ -3963,10 +3972,6 @@ spa_load_impl(spa_t *spa, spa_import_type_t type, char
 		 * Clean up any stale temporary dataset userrefs.
 		 */
 		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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906031756.x53Huidj052092>