diff options
author | Mark Johnston <markj@FreeBSD.org> | 2017-03-27 16:25:58 +0000 |
---|---|---|
committer | Mark Johnston <markj@FreeBSD.org> | 2017-03-27 16:25:58 +0000 |
commit | 819cd913f4bd9af144d194bcb2cc01528bf0742b (patch) | |
tree | 8be4ab2b5a299ad2d566d298c62a496f0b29144a /sys/geom | |
parent | 5788c2bde13296d8580b511265336de2b4c5de03 (diff) | |
download | src-819cd913f4bd9af144d194bcb2cc01528bf0742b.tar.gz src-819cd913f4bd9af144d194bcb2cc01528bf0742b.zip |
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
Notes
Notes:
svn path=/head/; revision=316032
Diffstat (limited to 'sys/geom')
-rw-r--r-- | sys/geom/mirror/g_mirror.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c index 02ca68b9cee8..f68a8926916c 100644 --- a/sys/geom/mirror/g_mirror.c +++ b/sys/geom/mirror/g_mirror.c @@ -3040,7 +3040,7 @@ g_mirror_destroy(struct g_mirror_softc *sc, int how) 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, int howto) struct g_mirror_softc *sc; int error; + if (panicstr != NULL) + return; + mp = arg; g_topology_lock(); g_mirror_shutdown = 1; |