PERFORCE change 123979 for review
Ulf Lilleengen
lulf at FreeBSD.org
Mon Jul 23 17:31:22 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=123979
Change 123979 by lulf at lulf_carrot on 2007/07/23 17:31:10
- Change order of GV_PLEX_DEGRADED and _RESIZING, since we now allow
mounted rebuilds.
- Make use of bio_pflags and a bad misuse of GV_BIO_SYNCREQ to determine
if we're handling a resize BIO. But, since the bio_?flags-fields are only
eight bits...
Affected files ...
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_plex.c#19 edit
.. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_var.h#23 edit
Differences ...
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_plex.c#19 (text+ko) ====
@@ -377,7 +377,7 @@
gv_rebuild_complete(p, pbp);
} else if (pbp->bio_cflags & GV_BIO_INIT) {
gv_init_complete(p, pbp);
- } else if (p->state == GV_PLEX_RESIZING) {
+ } else if (pbp->bio_pflags & GV_BIO_SYNCREQ) {
gv_grow_complete(p, pbp);
} else {
g_io_deliver(pbp, pbp->bio_error);
@@ -628,6 +628,7 @@
bp->bio_error = 0;
bp->bio_offset = offset;
bp->bio_length = length;
+ bp->bio_pflags |= GV_BIO_SYNCREQ; /* XXX: misuse of pflags AND syncreq.*/
if (data == NULL)
data = g_malloc(length, M_WAITOK);
bp->bio_cflags |= GV_BIO_MALLOC;
==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_var.h#23 (text+ko) ====
@@ -310,8 +310,8 @@
int state; /* The plex state. */
#define GV_PLEX_DOWN 0
#define GV_PLEX_INITIALIZING 1
-#define GV_PLEX_RESIZING 2
-#define GV_PLEX_DEGRADED 3
+#define GV_PLEX_DEGRADED 2
+#define GV_PLEX_RESIZING 3
#define GV_PLEX_UP 4
int org; /* The plex organisation. */
More information about the p4-projects
mailing list