Re: SCSI device numbering

Johnie Stafford (
Mon, 1 Jul 96 10:23 CDT

>>>>> "ac" == Albert Cahalan <> writes:

ac> From: (Eric Youngdale)
>>> Anyway, I think we should be ok with a 12+20 bit dev_t,
>>> that sounds like the best solution right now.
>> OK, but the point was that 20 bits for a minor number is
>> insufficient for a fixed mapping of devices to minor numbers.
>> It would be sufficient if we wanted to continue to use dynamic
>> mapping of minors to devices, of course.

ac> No, it is sufficient for everything, including really weird
ac> SCSI adapters. Using nibble boundries (for nice hex output),
ac> dev_t can be split as follows:

ac> Purpose Bits Normal Extreme
ac> controller 4 <= 1 2
ac> bus 4 == 0 1
ac> device 8 <= 2 4

What about wide SCSI? It does 16 devices.

ac> lun 8 == 0 3
ac> partition 4 <= 3 4

What about an entry for the entire disk (eg. /dev/sda)? What about
logical partitions? If you include the entry for the entire disk, I
use 9 entries for my primary disk.

ac> Note that the number of bits allowed is far more than normally
ac> needed and is sufficient for every system reported to the kernel
ac> list. The extra 4 bits can be left reserved or used for the
ac> (rather artificial IMHO) distinction between disk and CD or
ac> whatever.

I think you are about 10 or 12 bits short.


 Johnie Stafford           |  Internet E-mail:
 KB5YVF - Lafayette, LA    | Ham Radio Packet:
                           |          WWW URL:
  for lifetime email -- mail