lkml.org 
[lkml]   [1996]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: SCSI device numbering (was: Re: Ideas for v2.1
Date
Followup to:  <9607011143.ZM3962@aib.com>
By author: "Eric Youngdale" <eric@aib.com>
In newsgroup: linux.dev.kernel
>
> If you suggesting that we use one common major number for every
> device on a given bus, then we need to decide how we assign minor numbers in
> light of the fact that we can have a mix of disk, tape, cdrom and generic
> device nodes trying to use the same major number. My guess is that for
> cdroms the 'partition' field would be 0. For tapes, the partition field
> could be used for the rewinding/non-rewinding part. This strikes me
> as a bit unclean, but I could be talked into it. I need to think about
> this a bit to see whether there are any other potential problems.
>

Actually, CD-ROMs have (one or more) sessions, which can be very
effectively treated as partitions. I would love to have a
multisession CD-ROM where I could mount any session I wanted. Let's
face it -- CD-ROMs are just removable, read-only disks with a couple
of quirks.

Tape drives and generic-SCSI are character devices, whereas disks and
CD-ROM are block devices. The former we could easily distinguish by a
bit in the minor.

>
> My main objection to the dynamic major idea is that it still leaves
> potential problems with devices being remapped to different major numbers
> if you move controller cards around. Some utility like scsidev would still
> be required to maintain the /dev entries that correspond to the dynamic
> majors. If people don't mind this level of inconvenience, then I have
> no problem with it, but I thought the point of this exercise was to try and
> see whether we could completely get away from dynamic assignment of device
> numbers.
>

Let's face it... we'll never get people to actually use *device names*
that incorporate bus information; they are simply too long. On
Solaris, which has such names, *everyone* uses the
dynamically-assigned "short" equivalent (the controller part is dynamic.)

> Also, there are some people who would like to have one common
> major number for *all* cdrom drives on the system (ide, scsi, etc).
> A top level driver would essentially dispatch through a table down to
> whatever the appropriate driver is to do the job. Dynamic majors take
> us further from this, although a sort of virtual device driver would
> probably also do the job here.

The people that call for that are basically the ones that want all
CD-ROMs on the same major (i.e. /dev/cdrom would be a bona fide
device.) I personally think it is useless -- that can be done by a
boot script if desired -- but there probably should be a uniform way
to find which devices correspond to actual CD-ROM, tape etc. devices.

-hpa

--
PGP public key available - finger hpa@zytor.com
I don't work for Yggdrasil, but they sponsor the linux.* hierarchy.
"The earth is but one country, and mankind its citizens." -- Bahá'u'lláh
Just Say No to Morden * Save Babylon 5: http://www.babylon5.com/cmp/support/


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.038 / U:2.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site