From owner-p4-projects@FreeBSD.ORG Wed Aug 8 16:38:25 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 96E0D16A419; Wed, 8 Aug 2007 16:38:25 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C86E16A479 for ; Wed, 8 Aug 2007 16:38:25 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 49F1013C461 for ; Wed, 8 Aug 2007 16:38:25 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l78GcPJH082226 for ; Wed, 8 Aug 2007 16:38:25 GMT (envelope-from lulf@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l78GcONb082223 for perforce@freebsd.org; Wed, 8 Aug 2007 16:38:24 GMT (envelope-from lulf@FreeBSD.org) Date: Wed, 8 Aug 2007 16:38:24 GMT Message-Id: <200708081638.l78GcONb082223@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to lulf@FreeBSD.org using -f From: Ulf Lilleengen To: Perforce Change Reviews Cc: Subject: PERFORCE change 124903 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2007 16:38:25 -0000 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);