Re: SCSI device numbering

Johnie Stafford (jms@pobox.com)
Mon, 1 Jul 96 10:23 CDT


>>>>> "ac" == Albert Cahalan <albert@ccs.neu.edu> writes:

ac> From: eric@aib.com (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

-- 
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 Johnie Stafford           |  Internet E-mail: jms@pobox.com
 KB5YVF - Lafayette, LA    | Ham Radio Packet: kb5yvf@k5arh.#lftla.la.us.noam
                           |          WWW URL: http://www.pobox.com/~jms
           pobox.com for lifetime email -- mail info@pobox.com
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-