Re: [RFT] #2 Support for ~2144 SCSI discs, scsi_debug

Douglas Gilbert
2001-08-10T04:18:49Z

[-- Attachment #1: Type: text/plain, Size: 2130 bytes --]

Richard Gooch wrote:
>
> Hi, all. Below is my second cut of a patch that adds support for
> large numbers of SCSI discs (approximately 2144). I'd like people to
> try this out. I've fixed a couple of "minor" typos that happened to
> disable sd detection. I've also tested this patch: it works fine on my
> 3 drive system. In addition, I've switched to using vmalloc() for key
> data structures, so the kmalloc() limitations shouldn't hit us. I've
> added an in_interrupt() test to sd_init() just in case.
>
> There are now 2 cases I'd like to have tested:
> - people with 17 to 128 SCSI discs
> - people with >128 SCSI discs
>
> because each of these exercises a slightly different setup path.
> Please send success or failure reports to me.

For people who are interested in Richard's patch and
don't have a large number of SCSI devices lying
around this may help:
Attached is a version of the scsi_debug adapter driver
that fakes 294 disks across 42 fake controllers. The
number it fakes can be tweaked in the top of scsi_debug.c
[I'll let Richard try 2144 disks :-)]

Each disk has 3 partitions and shares the same 8 MB of
RAM. These disks can't be repartitioned with fdisk but
can be mkfs-ed, mounted and used.

My kernel is lk 2.4.7 with Richard's patch described above.
I have set: CONFIG_SD_EXTRA_DEVS=300
so that I can load scsi_debug as a module.

Here is a list of target 0 on the last host:

$ ls -l /devfs/scsi/host46/bus0/target0/lun0/*
brw------- 1 root root 114, 16 Dec 31 1969
/devfs/scsi/host46/bus0/target0/lun0/disc
brw------- 1 root root 114, 17 Dec 31 1969
/devfs/scsi/host46/bus0/target0/lun0/part1
brw------- 1 root root 114, 18 Dec 31 1969
/devfs/scsi/host46/bus0/target0/lun0/part2
brw------- 1 root root 114, 19 Dec 31 1969
/devfs/scsi/host46/bus0/target0/lun0/part3

Note the large major device number that devfs is pulling
from the unused pool. Devfs makes some noise when
'rmmod scsi_debug' is executed but otherwise things looked
ok.

Doug Gilbert

[-- Attachment #2: scsi_debug_many_disks.tgz --]
[-- Type: application/octet-stream, Size: 7840 bytes --]