Mike Brown wrote: > > 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. Rakesh, I would just like to add that this question is covered in the device names section [3.2] of: http://www.linuxdoc.org/HOWTO/SCSI-2.4-HOWTO/ Doug Gilbert > 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. - To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED]

