The path of a request through the sg driver can be broken into 3 distinct stages:
For more information about normal (or indirect), direct and mmap-ed IO see Chapter 9 .
Currently the sg driver uses one Linux major device number (char 21) which in the lk 2.4 series limits it to handling 256 SCSI devices. Any attempt to attach more than this number will rejected with a message being sent to the console and the log file. [1]
[1] | Patches exist for sg to extend the number of SCSI devices past the 256 limit when the device file system (devfs) is being used. |