summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2004-08-18 07:28:48 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2004-08-18 07:28:48 +0000
commitf1ad62a4d8216d52c075e9b324a7b94905344fe7 (patch)
treecaceebf39739af123030066e59e060344eea9acf
parentd18c990625fd613a7f4063ab1718e5afeed1be4b (diff)
Notes
-rw-r--r--sys/geom/mirror/g_mirror.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c
index 29d44465b2cb..93a17aac522d 100644
--- a/sys/geom/mirror/g_mirror.c
+++ b/sys/geom/mirror/g_mirror.c
@@ -1898,18 +1898,12 @@ g_mirror_update_device(struct g_mirror_softc *sc, boolean_t force)
break;
}
case G_MIRROR_DEVICE_STATE_RUNNING:
- /*
- * Bump syncid here, if we need to do it immediately.
- */
- if (sc->sc_bump_syncid == G_MIRROR_BUMP_IMMEDIATELY) {
- sc->sc_bump_syncid = 0;
- g_mirror_bump_syncid(sc);
- }
if (g_mirror_ndisks(sc, -1) == 0) {
/*
* No disks at all, we need to destroy device.
*/
sc->sc_flags |= G_MIRROR_DEVICE_FLAG_DESTROY;
+ break;
} else if (g_mirror_ndisks(sc,
G_MIRROR_DISK_STATE_ACTIVE) == 0 &&
g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_NEW) == 0) {
@@ -1918,6 +1912,7 @@ g_mirror_update_device(struct g_mirror_softc *sc, boolean_t force)
*/
if (sc->sc_provider != NULL)
g_mirror_destroy_provider(sc);
+ break;
} else if (g_mirror_ndisks(sc,
G_MIRROR_DISK_STATE_ACTIVE) > 0 &&
g_mirror_ndisks(sc, G_MIRROR_DISK_STATE_NEW) == 0) {
@@ -1928,6 +1923,13 @@ g_mirror_update_device(struct g_mirror_softc *sc, boolean_t force)
if (sc->sc_provider == NULL)
g_mirror_launch_provider(sc);
}
+ /*
+ * Bump syncid here, if we need to do it immediately.
+ */
+ if (sc->sc_bump_syncid == G_MIRROR_BUMP_IMMEDIATELY) {
+ sc->sc_bump_syncid = 0;
+ g_mirror_bump_syncid(sc);
+ }
break;
default:
KASSERT(1 == 0, ("Wrong device state (%s, %s).",