From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K7wC7-00014B-11 for qemu-devel@nongnu.org; Sun, 15 Jun 2008 13:39:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K7wC6-00013U-8h for qemu-devel@nongnu.org; Sun, 15 Jun 2008 13:39:10 -0400 Received: from [199.232.76.173] (port=38098 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7wC6-00013I-4q for qemu-devel@nongnu.org; Sun, 15 Jun 2008 13:39:10 -0400 Received: from ecfrec.frec.bull.fr ([129.183.4.8]:37842) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K7wC6-0005MX-2Y for qemu-devel@nongnu.org; Sun, 15 Jun 2008 13:39:10 -0400 Received: from localhost (localhost [127.0.0.1]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id 37E8419D923 for ; Sun, 15 Jun 2008 19:39:39 +0200 (CEST) Received: from ecfrec.frec.bull.fr ([127.0.0.1]) by localhost (ecfrec.frec.bull.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 28438-02 for ; Sun, 15 Jun 2008 19:39:35 +0200 (CEST) Received: from cyclope.frec.bull.fr (cyclope.frec.bull.fr [129.183.4.9]) by ecfrec.frec.bull.fr (Postfix) with ESMTP id 28C0F19D916 for ; Sun, 15 Jun 2008 19:39:35 +0200 (CEST) Received: from [129.184.32.122] (client32-122.vpn_client.bull.fr [129.184.32.122]) by cyclope.frec.bull.fr (Postfix) with ESMTP id 5BA2D27289 for ; Sun, 15 Jun 2008 19:39:32 +0200 (CEST) Subject: Re: [Qemu-devel] [PATCH] Merge NBD client/server int qemu-nbd From: Laurent Vivier In-Reply-To: <48553CA3.9010009@qumranet.com> References: <1213370134.4833.29.camel@frecb07144> <4852B339.5090307@codemonkey.ws> <1213382394.3803.9.camel@frecb07144> <4853FD68.9000308@qumranet.com> <1213470224.3843.11.camel@frecb07144> <485416D2.9050900@qumranet.com> <1213471298.3843.20.camel@frecb07144> <48541D73.7000001@qumranet.com> <1213473262.15674.6.camel@frecb07144> <4855265F.9070409@codemonkey.ws> <1213545378.3806.10.camel@frecb07144> <48553CA3.9010009@qumranet.com> Content-Type: text/plain; charset=utf-8 Date: Sun, 15 Jun 2008 19:39:02 +0200 Message-Id: <1213551542.3806.13.camel@frecb07144> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 Le dimanche 15 juin 2008 =C3=A0 09:00 -0700, Avi Kivity a =C3=A9crit : > Laurent Vivier wrote: > > No, for me, the open() generates the events: > > > > open() -> blkdev_open() -> do_open() -> rescan_partitions() -> > > add_partitions() -> device_add() -> kobject_uevent() > > > > If you remove show_parts() from the main(), the partitions appear onl= y > > on the first open on the device, for instance you can run manually > > "cmp /dev/nbd0 /dev/zero" after "qemu-nbd --connect=3D/dev/nbd0 ...". > > > > =20 >=20 > Well then, simply call udevsettle after the open of the block device,=20 > after which you're guaranteed to have the paritions. Not possible: if I call the open too early the partitions are not updated and thus udevsettle is useless (remember: this open() is here only to update the partition table). Laurent --=20 ------------- Laurent.Vivier@bull.net --------------- "The best way to predict the future is to invent it." - Alan Kay