From owner-p4-projects@FreeBSD.ORG Tue Jul 31 19:59:51 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1EEB516A419; Tue, 31 Jul 2007 19:59:51 +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 B049616A417 for ; Tue, 31 Jul 2007 19:59:50 +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 99F5913C45E for ; Tue, 31 Jul 2007 19:59:50 +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 l6VJxoIR089148 for ; Tue, 31 Jul 2007 19:59:50 GMT (envelope-from lulf@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l6VJxorH089145 for perforce@freebsd.org; Tue, 31 Jul 2007 19:59:50 GMT (envelope-from lulf@FreeBSD.org) Date: Tue, 31 Jul 2007 19:59:50 GMT Message-Id: <200707311959.l6VJxorH089145@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 124435 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: Tue, 31 Jul 2007 19:59:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=124435 Change 124435 by lulf@lulf_carrot on 2007/07/31 19:59:35 - Run a loop with a small sleep instead of a "static" sleep count. Noted by: pjd@ Affected files ... .. //depot/projects/soc2007/lulf/gvinum_fixup/sbin/gvinum/gvinum.c#16 edit Differences ... ==== //depot/projects/soc2007/lulf/gvinum_fixup/sbin/gvinum/gvinum.c#16 (text+ko) ==== @@ -430,10 +430,14 @@ gctl_ro_param(req, "plexes", sizeof(int), &plexes); gctl_ro_param(req, "subdisks", sizeof(int), &subdisks); errstr = gctl_issue(req); - sleep(2); /* Wait for events to be executed. XXX: not very nice... but - we won't have to modify event system for just his issue. */ - if (errstr != NULL) + if (errstr != NULL) { warnx("error creating drive: %s", errstr); + gctl_free(req); + free(drivename); + usleep(100000); /* sleep for 0.1s. */ + printf("retrying...\n"); + return (create_drive(device)); + } gctl_free(req); return (drivename); }