From 7461cb05f9881a5e3d9e891ec8eacc53661f7cdf Mon Sep 17 00:00:00 2001 From: glebius Date: Wed, 1 Jun 2016 22:11:54 +0000 Subject: When we are in panic, always go the asynchronous path in g_mirror_destroy(), otherwise the system will hang. This is a temporarily least intrusive crutch to get certain panicing systems dumping. The proper fix should question is g_mirror_destroy() should be called on a panicing system at all. Discussed with: mav --- sys/geom/mirror/g_mirror.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys') diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c index 379f615..d4f03e8 100644 --- a/sys/geom/mirror/g_mirror.c +++ b/sys/geom/mirror/g_mirror.c @@ -2989,7 +2989,8 @@ g_mirror_destroy(struct g_mirror_softc *sc, int how) sx_assert(&sc->sc_lock, SX_XLOCKED); pp = sc->sc_provider; - if (pp != NULL && (pp->acr != 0 || pp->acw != 0 || pp->ace != 0)) { + if (pp != NULL && (pp->acr != 0 || pp->acw != 0 || pp->ace != 0 || + SCHEDULER_STOPPED())) { switch (how) { case G_MIRROR_DESTROY_SOFT: G_MIRROR_DEBUG(1, -- cgit v1.1