[450] in linux-scsi channel archive
Re: Generic Scsi Driver Bug Report and comments.
daemon@ATHENA.MIT.EDU (Craig "Woody"ward)
Tue Aug 1 22:45:48 1995
From: woody@mail.csh.rit.edu (Craig "Woody"ward)
Date: Tue, 1 Aug 1995 11:13:36 -0400
To: linux-scsi@vger.rutgers.edu (linux scsi)
>FROM: heiko@colossus.escape.de (Heiko Eissfeldt)
>> A better way would to map devices as follows:
>>
>> /dev/sg00 -> Controller 0, Id 0
>> /dev/sg01 -> Controller 0, Id 1
>> /dev/sg10 -> Controller 1, Id 0
>> /dev/sg11 -> Controller 1, Id 1
>> etc.
>I got frequent requests from HOWTO readers for static device mappings, too.
>It seems to be the natural way.
>
>To achieve this static mapping, you will have to reserve a device
>structure for every potential SCSI device.
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.
-Woody
PS: Thanks for the tip on the RESERVE reset behavior. While unrelated, it
made me think of something I missed while adapting the wd8013 driver to
handle Bernoulli drives... now performance is much better. :)