Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jun 2007 20:42:56 GMT
From:      Ulf Lilleengen <lulf@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 121717 for review
Message-ID:  <200706152042.l5FKgu82049095@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=121717

Change 121717 by lulf@lulf_carrot on 2007/06/15 20:42:36

	- Add returning correct value for "initializing"-state
	- Make it possible to set REVIVING and INITIALIZING states.

Affected files ...

.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_share.c#2 edit
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_state.c#11 edit

Differences ...

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_share.c#2 (text+ko) ====

@@ -236,6 +236,8 @@
 		return (GV_SD_UP);
 	else if (!strcmp(buf, "reviving"))
 		return (GV_SD_REVIVING);
+	else if (!strcmp(buf, "initializing"))
+		return (GV_SD_INITIALIZING);
 	else if (!strcmp(buf, "stale"))
 		return (GV_SD_STALE);
 	else

==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_state.c#11 (text+ko) ====

@@ -202,6 +202,16 @@
 			return (GV_ERR_ISATTACHED);
 		break;
 
+	case GV_SD_REVIVING:
+	case GV_SD_INITIALIZING:
+		/*
+		 * Only do this if we're forced, since it usually is done
+		 * internally, and then we do use the force flag. 
+		 */
+		if (!flags & GV_SETSTATE_FORCE)
+			return (GV_ERR_SETSTATE);
+		break;
+
 	case GV_SD_UP:
 		/* We can't bring the subdisk up if our drive is dead. */
 		d = s->drive_sc;



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