Re: [RFC/PATCH] usb-storage: wait for device scanning before mountingroot

From: Stefan Richter
Date: Thu Jun 19 2008 - 16:36:57 EST


Matthew Wilcox wrote:
> On Thu, Jun 19, 2008 at 09:54:06PM +0200, Stefan Richter wrote:
>> When to say "I've finished scanning"? --- I think the answer is: When
>> (a) probing of a configurable number of SCSI targets or logical units
>> was finished or (b) a configurable timeout occurs, whatever of the two
>> happens first.
...
> Yes, I do see the problem. There's no way the SCSI core can know when
> a driver has finished scanning, so I've punted to the driver to set its
> own timeout here.

This can of course (and frequently is) implemented in userspace, but
requires an initrd. I'm not up to speed how scsi_wait_scan is put to
use --- it can be used without initrd, can't it?

> I know that new devices really can show up at any
> time, but I think it's reasonable to say that if a machine is booted
> with the same configuration as last time, the drives should show up with
> the same names.

I know that is not what you meant here, but...:

They do show up with the same target identifiers and logical unit
identifiers. The SCSI core doesn't pass the identifiers through to
userland though. (Couldn't resist to go off-subject. Sorry.)
--
Stefan Richter
-=====-==--- -==- =--==
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/