From owner-p4-projects@FreeBSD.ORG Wed Aug 8 09:38:22 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4EE6116A41B; Wed, 8 Aug 2007 09:38:22 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 088C016A41A for ; Wed, 8 Aug 2007 09:38:22 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id E81FF13C45E for ; Wed, 8 Aug 2007 09:38:21 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l789cLd6025807 for ; Wed, 8 Aug 2007 09:38:21 GMT (envelope-from lulf@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l789cLlx025804 for perforce@freebsd.org; Wed, 8 Aug 2007 09:38:21 GMT (envelope-from lulf@FreeBSD.org) Date: Wed, 8 Aug 2007 09:38:21 GMT Message-Id: <200708080938.l789cLlx025804@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to lulf@FreeBSD.org using -f From: Ulf Lilleengen To: Perforce Change Reviews Cc: Subject: PERFORCE change 124886 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2007 09:38:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=124886 Change 124886 by lulf@lulf_carrot on 2007/08/08 09:38:13 - Always update state of an object to the state given by the newest drive configuration. This prevents a situation where a mirror will falsely stay in the up state because a drive with an older configuration didn't have the correct state. - Do not try to remove a subdisk from a drive in the GV_DRIVE_REFERENCED state, since it was never added to the list if that is the case. Affected files ... .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_rm.c#13 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_subr.c#27 edit Differences ... ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_rm.c#13 (text+ko) ==== @@ -279,7 +279,7 @@ gv_update_vol_size(v, gv_vol_size(v)); } } - if (s->drive_sc) + if (s->drive_sc && !(s->drive_sc->flags & GV_DRIVE_REFERENCED)) LIST_REMOVE(s, from_drive); LIST_REMOVE(s, sd); gv_free_sd(s); ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_subr.c#27 (text+ko) ==== @@ -92,8 +92,10 @@ v2 = gv_find_vol(sc, v->name); if (v2 != NULL) { /* XXX */ - if (is_newer) + if (is_newer) { + v2->state = v->state; printf("VINUM: newer volume found!\n"); + } g_free(v); continue; } @@ -110,8 +112,10 @@ p2 = gv_find_plex(sc, p->name); if (p2 != NULL) { /* XXX */ - if (is_newer) + if (is_newer) { + p2->state = p->state; printf("VINUM: newer plex found!\n"); + } g_free(p); continue; } @@ -137,8 +141,10 @@ s2 = gv_find_sd(sc, s->name); if (s2 != NULL) { /* XXX */ - if (is_newer) + if (is_newer) { + s2->state = s->state; printf("VINUM: newer subdisk found!\n"); + } g_free(s); continue; }