summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2016-06-01 22:11:54 +0000
committerglebius <glebius@FreeBSD.org>2016-06-01 22:11:54 +0000
commit7461cb05f9881a5e3d9e891ec8eacc53661f7cdf (patch)
tree03761e757e8fbd240df876c3db9e8f9971157e1f /sys/geom
parentc19f6ed60ab144819f3dc5c6eb47022ab1c9e518 (diff)
downloadFreeBSD-src-7461cb05f9881a5e3d9e891ec8eacc53661f7cdf.zip
FreeBSD-src-7461cb05f9881a5e3d9e891ec8eacc53661f7cdf.tar.gz
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
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/mirror/g_mirror.c3
1 files changed, 2 insertions, 1 deletions
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,
OpenPOWER on IntegriCloud