Re: [PATCH] Add a 'wait-scan' command to /proc/scsi/scsi.

Kay Sievers
2009-03-26T17:25:46Z

On Thu, Mar 26, 2009 at 15:47, Bill Nottingham <notting@redhat.com> wrote:
> Matthew Wilcox (matthew@wil.cx) said:

>> > Well, in the case I'm looking at, udev is what's loading the host
>> > controllers, and there needs to be some sort of synchronization point
>> > between that and LVM invocations, fsck, mount, etc. Since scans
>> > aren't sent over as events for udev to catch, 'udevadm settle'
>> > isn't enough.
>>
>> So ... if we sent a udev event when the scan list was empty, you'd be OK?
>
> I'm CC'ing Peter, who has some more ideas - it would definitely be a good
> start, but we'd probably at least need to know when the scan list started
> being filled as well.

I don't like to see any uevent send for issues like this. This would
just be a hack around badly designed system services, which should be
fixed themselves and not worked around in the kernel. This hack will
run useless events for system who don't need them.

Something like a poll()'able sysfs file, which other subsytems already
use, and which can be used to wake up a process that can blocks, might
work fine here.

Thanks,
Kay