Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Aug 2007 09:38:21 GMT
From:      Ulf Lilleengen <lulf@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 124886 for review
Message-ID:  <200708080938.l789cLlx025804@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 			}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708080938.l789cLlx025804>