Hi Rakesh,
include/linux/major.h only allocates 1 major device code for sg devices:
#define SCSI_GENERIC_MAJOR 21
and since kdev_t is 2 bytes and the least significant byte used is for
minor device codes, this means there is an upper limit of 256 scsi generic
devices.
However, under low memory conditions sg_attach() can fail to allocate
memory for an Sg_device which would reduce the number of scsi generic
devices available on your system. sg.c doesn't reserve space for 256
Sg_device's at init time, it allocates SG_DEV_ARR_LUMP (6) more than the
number of currently known scsi devices. sg_attach() will allocate memory
for a new sg device as needed. Therefore if this allocation fails,
you will not be able use 256 scsi generic devices.
Under sane conditions 256 should be the limit.
On Fri, 27 Apr 2001, rakesh rakesh wrote:
>Hi List,
> Can anyone let me know maximum no of sg(scsi
>genric) devices we can have on lk-2.4.0 and 2.4.2
>kernel.
>
>thankx
>
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Auctions - buy the things you want at great prices
>http://auctions.yahoo.com/
>-
>To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
>the body of a message to [EMAIL PROTECTED]
>
-Michael F. Brown, UMass Lowell Computer Science
phone: (978) 934-5354
email: [EMAIL PROTECTED]
"In theory, there is no difference between theory and practice,
but in practice, there is." - Jan L.A. van de Snepscheut
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]