PERFORCE change 82585 for review

soc-cjones soc-cjones at FreeBSD.org
Fri Aug 26 03:19:55 GMT 2005


http://perforce.freebsd.org/chv.cgi?CH=82585

Change 82585 by soc-cjones at soc-cjones_ishtar on 2005/08/26 03:19:48

	Duh.  So simple.  Of course you need to initialize the pointer to the vinumconf in the new sd.  Gah.  So now it works.

Affected files ...

.. //depot/projects/soc2005/gvinum/src/sys/geom/vinum/geom_vinum_move.c#13 edit

Differences ...

==== //depot/projects/soc2005/gvinum/src/sys/geom/vinum/geom_vinum_move.c#13 (text+ko) ====

@@ -225,7 +225,9 @@
 	strncpy(newsd->name, cursd->name, GV_MAXSDNAME);
 	strncpy(newsd->drive, destination, GV_MAXDRIVENAME);
 	newsd->state = GV_SD_STALE;
-	printf("gv_move_sd: initialized newsd; name='%s', drive='%s', size=%lld, plex_offset=%lld\n", newsd->name, newsd->drive, newsd->size, newsd->plex_offset);
+	newsd->vinumconf = cursd->vinumconf;
+	printf("gv_move_sd: initialized newsd; name='%s', drive='%s', size=%lld, plex_offset=%lld\n",
+	       newsd->name, newsd->drive, newsd->size, newsd->plex_offset);
 	err = gv_sd_to_drive(sc, d, newsd, errstr, ERRBUFSIZ);
 	printf("gv_move_sd: allocated newsd to drive, drive_offset=%lld\n", newsd->drive_offset);
 	if (err) { /* XXX not enough free space? */
@@ -240,7 +242,8 @@
 	g_detach(cp);
         printf("gv_move_sd: detached consumer\n");
 	LIST_FOREACH_SAFE(s, &p->subdisks, in_plex, s2) {
-	    printf("gv_move_sd: traversing in_plex list (s: %p, s->name: '%s', s2: %p)\n", s, s->name, s2);
+	    printf("gv_move_sd: traversing in_plex list (s: %p, s->name: '%s', s2: %p)\n", 
+		   s, s->name, s2);
 	    printf("gv_move_sd: for sd '%s', consumer = %p\n", s->name, s->consumer);
 		if (s == cursd) {
 		    printf("\thit!\n");
@@ -272,7 +275,7 @@
 	} else {
 		printf("gv_move_sd: set newsd->consumer to %p\n", newsd->consumer);
 	}
-	newsd->consumer = cp;
+	/* newsd->consumer = cp; */
 	printf("gv_move_sd: before LIST_INSERT_HEAD\n");
 	LIST_INSERT_HEAD(&sc->subdisks, newsd, sd);
 	printf("gv_move_sd: inserted newsd into subdisks list\n");


More information about the p4-projects mailing list