qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Merge NBD client/server int qemu-nbd


From: Laurent Vivier
Subject: Re: [Qemu-devel] [PATCH] Merge NBD client/server int qemu-nbd
Date: Sun, 15 Jun 2008 19:39:02 +0200

Le dimanche 15 juin 2008 à 09:00 -0700, Avi Kivity a écrit :
> 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.

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
-- 
------------- address@hidden ---------------
"The best way to predict the future is to invent it."
- Alan Kay





reply via email to

[Prev in Thread] Current Thread [Next in Thread]