PERFORCE change 82005 for review
soc-cjones
soc-cjones at FreeBSD.org
Mon Aug 15 04:07:30 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=82005
Change 82005 by soc-cjones at soc-cjones_ishtar on 2005/08/15 04:07:03
Ha! It works! Now to fix up that pesky little can't-access-plex problem....
Affected files ...
.. //depot/projects/soc2005/gvinum/src/sys/geom/vinum/geom_vinum_move.c#7 edit
Differences ...
==== //depot/projects/soc2005/gvinum/src/sys/geom/vinum/geom_vinum_move.c#7 (text+ko) ====
@@ -198,44 +198,48 @@
since we don't really want to deal with tokenizing stuff.
Oh well. */
s2 = g_malloc(sizeof(*s2), M_WAITOK | M_ZERO);
- printf("A\n");
snprintf(s2->name, GV_MAXSDNAME, "temp.s0"); /* TODO Come up with temp name. */
- printf("B (s2->name = %s)\n", s2->name);
+ printf("gv_move_sd: B (s2->name = %s)\n", s2->name);
s2->size = s->size;
- printf("C\n");
strncpy(s2->drive, d->name, GV_MAXSDNAME);
- s2->drive_sc = d;
+ /* XXX this breaks allocating the sd to a drive. s2->drive_sc = d; */
s2->drive_offset = -1;
s2->plex_offset = -1;
- printf("D\n");
s2->plex_sc = (struct gv_plex *) NULL;
s2->state = GV_SD_DOWN;
s2->vinumconf = sc;
- printf("E\n");
+ printf("gv_move_sd: E\n");
err = gv_sd_to_drive(sc, d, s2, errstr, sizeof(errstr));
if (err) {
- printf("F errstr = %s\n", errstr);
+ printf("gv_move_sd: F errstr = %s\n", errstr);
gctl_error(req, errstr);
g_free(s2);
return err;
}
- printf("G\n");
+ printf("gv_move_sd: G\n");
s2->flags |= GV_SD_NEWBORN;
- printf("H\n");
LIST_INSERT_HEAD(&sc->subdisks, s2, sd);
- printf("I\n");
+ printf("gv_move_sd: I\n");
s2->state = GV_SD_STALE;
- printf("J\n");
+ printf("gv_move_sd: J\n");
gv_save_config_all(sc);
- printf("K\n");
+ printf("gv_move_sd: K\n");
/* TODO -- move data from old sd to new sd. */
/* TODO -- rename new sd, update plexes, and delete old sd. */
- strncpy(s2->name, s->name, GV_MAXSDNAME);
+ strncpy(s2->name, s->name, GV_MAXSDNAME);
+ strncpy(s2->plex, s->plex, GV_MAXPLEXNAME);
+ printf("gv_move_sd: L\n");
+ s2->plex_offset = s->plex_offset;
+ printf("gv_move_sd: M\n"); /* DIES HERE */
+ LIST_INSERT_BEFORE(s, s2, in_plex);
+ printf("gv_move_sd: N\n");
gv_rm_sd(sc, req, s, flags);
+ printf("gv_move_sd: O\n");
gv_save_config_all(sc);
+ printf("gv_move_sd: done gv_move_sd\n");
return (0);
}
More information about the p4-projects
mailing list