From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K7ueo-00059p-P3 for qemu-devel@nongnu.org; Sun, 15 Jun 2008 12:00:42 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K7uel-00058O-Q4 for qemu-devel@nongnu.org; Sun, 15 Jun 2008 12:00:41 -0400 Received: from [199.232.76.173] (port=47156 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K7uek-00058D-PP for qemu-devel@nongnu.org; Sun, 15 Jun 2008 12:00:38 -0400 Received: from il.qumranet.com ([212.179.150.194]:37133) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K7uek-0006K2-By for qemu-devel@nongnu.org; Sun, 15 Jun 2008 12:00:38 -0400 Message-ID: <48553CA3.9010009@qumranet.com> Date: Sun, 15 Jun 2008 09:00:35 -0700 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> <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> In-Reply-To: <1213545378.3806.10.camel@frecb07144> Content-Type: text/plain; charset=UTF-8; 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 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 only > on the first open on the device, for instance you can run manually > "cmp /dev/nbd0 /dev/zero" after "qemu-nbd --connect=/dev/nbd0 ...". > > Well then, simply call udevsettle after the open of the block device, after which you're guaranteed to have the paritions. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.