mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
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
This commit is contained in:
parent
5788c2bde1
commit
819cd913f4
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue