[451] in linux-scsi channel archive
Re: Generic Scsi Driver Bug Report and comments.
daemon@ATHENA.MIT.EDU (H. Peter Anvin)
Wed Aug 2 05:46:33 1995
To: submit-linux-dev-scsi@ratatosk.yggdrasil.com
From: hpa@asgard.yggdrasil.com (H. Peter Anvin)
Date: 2 Aug 1995 04:51:56 GMT
Reply-To: Peter.Anvin@linux.org (H. Peter Anvin)
Followup to: <199508011513.LAA11746@jake.csh.rit.edu>
By author: woody@mail.csh.rit.edu (Craig "Woody"ward)
In newsgroup: linux.dev.scsi
>
> Not quite. The current mapping system has to remember now which
> controller and which lun it's on. Whats wrong with leaving that code just
> as it is, and then have these devices be virtual? So if I have luns 2 and 4
> on controller 0 and lun 5 on controller 1, then at detection the mapping
> would be:
>
> /dev/sg02 -> /dev/sga
> /dev/sg04 -> /dev/sgb
> /dev/sg15 -> /dev/sgc
>
> Having these virtual devices do a lookup in the already existing
> structures may take a few cycles more for each open, but they would be as
> dynamic as the SCSI driver is. This is similar to how the old /dev/console
> worked. This makes both camps happy, as you can have static device points
> and dynamic lists both without eating a huge amount of memory.
>
It should be pretty easy to run a script at boot time to parse
/proc/scsi/scsi and set up these types of links at boot time. It is
then, however, essential to come up with one naming scheme that all
can agree on, and it should involve all types of SCSI devices, not
just the generic ones.
Since the number of devices is likely to be quite large, it would
probably be advisable to make it a /dev subdirectory (although I
personally usually loathe them.)
Also, it still doesn't solve what I think is the #1 problem with SCSI
as we know it, which is that swapping out one card with a different
type in a machine with several controllers can cause the device
numbers to reverse. Hence, there will always be an element of
dynamicity no matter how hard we try to avoid it.
/hpa
--
PGP public key available - finger hpa@yggdrasil.com
"The earth is but one country, and mankind its citizens." -- Baha'u'llah