Re: SCSI device numbering

Frohwalt Egerer (froh@devnull.iconsult.com)
4 Jul 1996 08:41:19 +0200


jms@pobox.com (Johnie Stafford) writes:

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

> 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.

Why are you all discussing on how to allocate which bits, while the
really things that should be constant are the names disks are accessed
under? I really don't care what major and minor numbers my drives and
partitions have, what I care about is /dev/sdb1 becoming /dev/sda1
when unmounting old sda1.

IMO the right solution (an the one that offers least problems due to
'allocated bits' in the future) is to dynamically count the devices
just as it happens now, while providing consistent device _names_ to
the user.

I wouldn't care if this is implemented by /proc/scsi/dev, by some user
level program much like the existing one or a mixture of black magic
and penguin droppings.

Grantend, I'm biased to a solution that runs in user level since it
doesn't cause kernel bloat, is extendible (like using 'named
partitions' as discussed frequently or implementing the numbering
scheme of SCSI-gazillion one thousand years ahead.)

Disk standards are evolving and 'possibly addressable devices' are
growing much more rapidly than 'maximum number of installed
drives'. Five days after you invent a large enough dev_t somebody will
invent a wacko standard that the new dev_t hasn't enough bits for. But
nobody will use more than 2^16 hardisk partitions ('minor' portion of
32-bit dev_t) for a quite long time. (Famous last words ;-)

Is allocating bits to lun, id, host, channel or whatever really the
right solution to the problem of the 'spontanous jumping device'
syndrom or aren't there some other, possibly better, solutions? Are
there other problems with "counting devices" so that this solution
should be abandonend?

Froh

P.S.: Don't view this as disagreement to expanding dev_t to whatever
bit size in the future. I just disagree in 'wasting' bits by
allocating them to hardware addresses.

P.P.S.: Using a user level program for enumerating partitions raises
another question: Should user level programs tightly coupled with the
kernel, like modutils or the user level part of md and the like better
be distributed together with the kernel source tree? How would one
decide what belongs where?

-- 
Frohwalt Egerer                froh@iconsult.com, froh@devnull.franken.de
                                            ftpadmin@rrze.uni-erlangen.de

Any good C++ compiler can directly read and compile correct Pascal, Basic, COBOL, and Fortran code -- C++ is a superset of all other languages. If your compiler is giving you errors you either have bugs in your code or one of your IRQ settings is wrong. -- The C++ FUQ