|
From: | Avi Kivity |
Subject: | Re: [Qemu-devel] [PATCH] Merge NBD client/server int qemu-nbd |
Date: | Sun, 15 Jun 2008 09:00:35 -0700 |
User-agent: | Thunderbird 2.0.0.14 (X11/20080501) |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |