From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K7DiR-0006E4-BM for qemu-devel@nongnu.org; Fri, 13 Jun 2008 14:09:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K7DiP-0006D0-M1 for qemu-devel@nongnu.org; Fri, 13 Jun 2008 14:09:34 -0400 Received: from [199.232.76.173] (port=33824 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7DiP-0006Ct-Ed for qemu-devel@nongnu.org; Fri, 13 Jun 2008 14:09:33 -0400 Received: from il.qumranet.com ([212.179.150.194]:23938) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K7DiP-0004rk-20 for qemu-devel@nongnu.org; Fri, 13 Jun 2008 14:09:33 -0400 Message-ID: <4852B7CD.3060404@qumranet.com> Date: Fri, 13 Jun 2008 21:09:17 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Merge NBD client/server int qemu-nbd References: <1213370134.4833.29.camel@frecb07144> <4852B339.5090307@codemonkey.ws> In-Reply-To: <4852B339.5090307@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Anthony Liguori wrote: >> >> # qemu-nbd --disconnect /dev/nbd0 >> >> Regards, >> Laurent >> +static void show_parts(const char *device) >> +{ >> + if (fork() == 0) { >> + int nbd; >> + >> + /* wait device */ >> + sleep(1); >> > > This looks like a big red-herring. What is this sleep waiting for any > can it be possibly made into something less racy? It's called udevsettle, if the host is running udev. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.