Date: Wed, 8 Aug 2007 16:38:24 GMT From: Ulf Lilleengen <lulf@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 124903 for review Message-ID: <200708081638.l78GcONb082223@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=124903 Change 124903 by lulf@lulf_carrot on 2007/08/08 16:38:13 - Add status indicator on plex that is growing. This will show how much precentage of the plex is finished growing. - Remove debugging comments when growing. Affected files ... .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_init.c#23 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_list.c#4 edit .. //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_plex.c#25 edit Differences ... ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_init.c#23 (text+ko) ==== @@ -267,7 +267,6 @@ v = p->vol_sc; KASSERT(v != NULL, ("gv_grow_plex: NULL v")); - printf ("Start growing\n"); if (p->flags & GV_PLEX_GROWING || p->flags & GV_PLEX_SYNCING || p->flags & GV_PLEX_REBUILDING) @@ -295,8 +294,8 @@ p->flags |= GV_PLEX_GROWING; origsize = (sdcount - 1) * s->size; origlength = (sdcount - 1) * p->stripesize; - printf("Starting growing at 0 reading %jd bytes\n", origlength); p->synced = 0; + printf("VINUM: starting growing of plex %s\n", p->name); gv_grow_request(p, 0, MIN(origlength, origsize), BIO_READ, NULL); return (0); ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_list.c#4 (text+ko) ==== @@ -294,7 +294,7 @@ p->name, (intmax_t)p->size, (intmax_t)p->size / MEGABYTE); sbuf_printf(sb, "\t\tSubdisks: %8d\n", p->sdcount); sbuf_printf(sb, "\t\tState: %s\n", gv_plexstate(p->state)); - if (p->flags & GV_PLEX_SYNCING) { + if ((p->flags & GV_PLEX_SYNCING) || (p->flags & GV_PLEX_GROWING)) { sbuf_printf(sb, "\t\tSynced: "); sbuf_printf(sb, "%16jd bytes (%d%%)\n", (intmax_t)p->synced, @@ -312,7 +312,7 @@ } else { sbuf_printf(sb, "P %-18s %2s State: ", p->name, gv_plexorg_short(p->org)); - if (p->flags & GV_PLEX_SYNCING) { + if ((p->flags & GV_PLEX_SYNCING) || (p->flags & GV_PLEX_GROWING)) { sbuf_printf(sb, "S %d%%\t", (int)((p->synced * 100) / p->size)); } else { ==== //depot/projects/soc2007/lulf/gvinum_fixup/sys/geom/vinum/geom_vinum_plex.c#25 (text+ko) ==== @@ -703,7 +703,6 @@ /* If it was a read, write it. */ if (bp->bio_cmd == BIO_READ) { - printf("Finished read, do a write\n"); p->synced += bp->bio_length; err = gv_grow_request(p, bp->bio_offset, bp->bio_length, BIO_WRITE, bp->bio_data); @@ -728,7 +727,6 @@ if (bp->bio_offset + bp->bio_length >= origsize) { printf("VINUM: growing of %s completed\n", p->name); p->flags &= ~GV_PLEX_GROWING; - printf("Updating state\n"); LIST_FOREACH(s, &p->subdisks, in_plex) { s->flags &= ~GV_SD_GROW; gv_set_sd_state(s, GV_SD_UP, 0); @@ -742,7 +740,6 @@ gv_plex_flush(p); } else { offset = bp->bio_offset + bp->bio_length; - printf("Issuing next bio read at 0x%jx\n", offset); err = gv_grow_request(p, offset, MIN(bp->bio_length, origsize - offset), BIO_READ, NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708081638.l78GcONb082223>