PERFORCE change 124435 for review

Ulf Lilleengen lulf at FreeBSD.org
Tue Jul 31 19:59:51 UTC 2007


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

Change 124435 by lulf at 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);
 }


More information about the p4-projects mailing list