From 959521ff1fa08381bc75edf463480bf199ee48d3 Mon Sep 17 00:00:00 2001 From: Pawel Jakub Dawidek Date: Sat, 31 Jul 2004 22:10:51 +0000 Subject: [PATCH] If there are no valid components after the timeout, just destroy device. There is probably nothing to wait for. --- sys/geom/mirror/g_mirror.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c index 354697101d7f..5a14ab9f149e 100644 --- a/sys/geom/mirror/g_mirror.c +++ b/sys/geom/mirror/g_mirror.c @@ -1732,13 +1732,8 @@ g_mirror_update_device(struct g_mirror_softc *sc, boolean_t force) } } if (ndisks == 0) { - int timeout; - - /* No valid disks still, wait some more. */ - timeout = - atomic_load_acq_int(&g_mirror_timeout); - callout_reset(&sc->sc_callout, timeout * hz, - g_mirror_go, sc); + /* No valid disks found, destroy device. */ + sc->sc_flags |= G_MIRROR_DEVICE_FLAG_DESTROY; return; } } else {