Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Mar 2017 16:25:58 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316032 - head/sys/geom/mirror
Message-ID:  <201703271625.v2RGPwB1067405@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Mon Mar 27 16:25:58 2017
New Revision: 316032
URL: https://svnweb.freebsd.org/changeset/base/316032

Log:
  Refine r301173 a bit.
  
  - Don't execute any of g_mirror_shutdown_post_sync() when panicking. We
    cannot safely idle the mirror or stop synchronization in that state, and
    the current attempts to do so complicate debugging of gmirror itself.
  - Check for a non-NULL panicstr instead of using SCHEDULER_STOPPED(). The
    latter was added for use in the locking primitives.
  
  Reviewed by:	mav, pjd
  MFC after:	2 weeks
  Sponsored by:	Dell EMC Isilon

Modified:
  head/sys/geom/mirror/g_mirror.c

Modified: head/sys/geom/mirror/g_mirror.c
==============================================================================
--- head/sys/geom/mirror/g_mirror.c	Mon Mar 27 16:18:19 2017	(r316031)
+++ head/sys/geom/mirror/g_mirror.c	Mon Mar 27 16:25:58 2017	(r316032)
@@ -3040,7 +3040,7 @@ g_mirror_destroy(struct g_mirror_softc *
 	g_topology_assert_not();
 	sx_assert(&sc->sc_lock, SX_XLOCKED);
 
-	if (sc->sc_provider_open != 0 || SCHEDULER_STOPPED()) {
+	if (sc->sc_provider_open != 0) {
 		switch (how) {
 		case G_MIRROR_DESTROY_SOFT:
 			G_MIRROR_DEBUG(1,
@@ -3374,6 +3374,9 @@ g_mirror_shutdown_post_sync(void *arg, i
 	struct g_mirror_softc *sc;
 	int error;
 
+	if (panicstr != NULL)
+		return;
+
 	mp = arg;
 	g_topology_lock();
 	g_mirror_shutdown = 1;



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