Re: triggering udev rules based on the state of udevd

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

 



On Wed, Jul 02, 2008 at 12:34:58PM -0400, Bill Nottingham wrote:
> Kay Sievers (kay.sievers@xxxxxxxx) said: 
> > What would be the "end" of the queue you want to push events to?
> 
> Generally, just the current udev queue, whether it's the cascade of
> events from a 'scsi' adapter, or from a usb bus being scanned, etc.

USB doesn't have an "end of scan" event.  At any point, the hub could
signal the kernel's hub driver that a new device is present, and then
a (set of) uevent(s) for that device would eventually be sent to udev.

It's the same as trying to wait for all USB-attached disks to show up
when waiting to mount filesystems: if the user plugs in a USB disk at
just the wrong time, you'll miss it, no matter what method you choose.
USB has no way to tell when all attached devices have been processed.

Of course, this doesn't apply (exactly) if your RAID members aren't on
USB, but it may apply to certain other bus types as well.

In general, I'd say that a (poor but workable) solution would be to
simply wait for a certain amount of time after "udevadm settle" is
finished, then do another settle (in case new uevents happened), then
run the assemble manually.  It's not foolproof, and on a slower machine
it could still miss disks, but it's (slightly) better than nothing.

Attachment: pgpv1kXd0Gk34.pgp
Description: PGP signature


[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