From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bryan Kadzban Date: Wed, 02 Jul 2008 16:44:09 +0000 Subject: Re: triggering udev rules based on the state of udevd Message-Id: <20080702164409.GA4599@kadzban.is-a-geek.net> MIME-Version: 1 Content-Type: multipart/mixed; boundary="BOKacYhQ+x31HxR3" List-Id: References: <20080702151527.GA22892@nostromo.devel.redhat.com> In-Reply-To: <20080702151527.GA22892@nostromo.devel.redhat.com> To: linux-hotplug@vger.kernel.org --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 02, 2008 at 12:34:58PM -0400, Bill Nottingham wrote: > Kay Sievers (kay.sievers@vrfy.org) said:=20 > > What would be the "end" of the queue you want to push events to? >=20 > 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. --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIa7BZS5vET1Wea5wRAkVjAJ9RTg0XF9oOiTbcGXTmNgiYWRZ3PQCePhKL GX06wM7inN35Op0uUWFxZZE= =ekrG -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3--