Date: Tue, 31 Jul 2007 19:51:05 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Ulf Lilleengen <lulf@FreeBSD.org> Cc: Perforce Change Reviews <perforce@FreeBSD.org> Subject: Re: PERFORCE change 124344 for review Message-ID: <20070731175105.GU1092@garage.freebsd.pl> In-Reply-To: <200707301047.l6UAlD8L092463@repoman.freebsd.org> References: <200707301047.l6UAlD8L092463@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Mon, Jul 30, 2007 at 10:47:13AM +0000, Ulf Lilleengen wrote: > http://perforce.freebsd.org/chv.cgi?CH=124344 > > Change 124344 by lulf@lulf_carrot on 2007/07/30 10:47:07 > > - Sleep after sending create requests in userland, since the event might > not yet be processed. If there are noteable issues with this, which is > a quite unlikely to happen, I have a patch to support suspending > of the userland process until the events are executed, but it's only > required in this special case. Sleeping that way is, as you noted, not very nice... Can't you put a loop below errstr check, which will wait for drive creation. You could sleep for eg. 0.1s between checks. Also not very nice, but even 2s may be too low on very loaded systems. > Affected files ... > > .. //depot/projects/soc2007/lulf/gvinum_fixup/sbin/gvinum/gvinum.c#15 edit > > Differences ... > > ==== //depot/projects/soc2007/lulf/gvinum_fixup/sbin/gvinum/gvinum.c#15 (text+ko) ==== > > @@ -430,6 +430,8 @@ > 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) > warnx("error creating drive: %s", errstr); > gctl_free(req); -- Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFGr3aJForvXbEpPzQRAt4eAKCu+BQmiU9H2D9wEmWjF4k8NUZaMgCfS1UV 0e9SmM5v60lK+5J9wS+2YGk= =N1Xm -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070731175105.GU1092>
