Re: udev 145, when are events fully processed?

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

 



Alan Jenkins wrote:
> On 8/7/09, Kay Sievers <kay.sievers@xxxxxxxx> wrote:
>   
>> On Fri, Aug 7, 2009 at 16:48, Nigel Kukard<nkukard@xxxxxxxx> wrote:
>>
>>     
>>> I have a nice C proggie I'll including in bootutils, unless you guys are
>>> interested in including it in udev?. Attached for anyone interested,
>>> with timeout support. It can wait for a device or labeled device to come
>>> up  :)
>>>       
>> It looks fine, but I guess it does nothing really else than:
>>   udevadm settle --exit-if-exists=/dev/disk/by-label/foo
>>     
>
> I think that still exits as soon as the queue becomes empty.  Isn't
> there a problem with usb devices being probed asynchronously?
>
> I'm thinking of the "rootwait" problem.  The problem that is addressed
> in-kernel by the "initdev" patches.  Doesn't userspace (initramfs)
> still have to deal with that?
>   
I think you guys are missing the problem I'm having. This has nothing to
do with USB, I don't use USB and don't load any USB modules. I've tried
this out on 3 boxes using kernel 2.9.29.6 and udev 145.

Here are the modules loaded ...
ahci, piix, ide_core, ata_piix, pata_acpi, libata

* I have a kernel with an initramfs, no disk controller modules are
loaded at all before the initramfs fires up
* My script is this ....
examine pci bus & modprobe modules we need for disks
fire up udev
udev trigger
udev settle
mount LABEL=root

Simple. Now .... that works in 141 fine, it does not in 145. If I do an
ls /dev straight after settle, there are no sd* devices. If I add a
sleep 5s after settle, the devices are there.

udevadm settle exits after about 1 second, when I check the creation
times on the devices it takes a few seconds, up to 5 depending on the
speed of the box.

Kay, you said yourself that settle does not wait until the events are
fully processed and exits once they have been recieved by udev. This is
EXACTLY what is happening in 145. You further said this is due to the
speed improvements with 145 and I was just lucky in 141 and I should be
waiting for the udev event that the device has been processed. I went
over the chat logs again to make sure I'm not imagining things.

This will not work ...  udevadm settle
--exit-if-exists=/dev/disk/by-label/foo  , 'udevadm settle'  exits
BEFORE the device is created.


--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux