Subject: Re: 32 bit dev_t, Revision 3
To: Chris G. Demetriou <cgd@pa.dec.com>
From: Darren Reed <darrenr@cyber.com.au>
List: tech-kern
Date: 01/14/1998 23:05:22
In some mail I received from Chris G. Demetriou, sie wrote
> 
> >  - 32-bit dev_t split up as {
> > 	12 bits major
> > 	20 bits minor {
> > 	   10 bits "unit"
> > 	   10 bits "subunit"
> > 	}
> >    }
> >    (interpretation of minor is left to the device itself; disks and
> >    tapes use the subunit while ttys are generally just sequential);
> >    ls -l shows <major,unit,subunit> (even on ttys).
> 
> What is the definition of 'unit'?  For example, take SCSI.  Does
> device,LUN -> unit and partition number -> subunit, or does device ->
> unit and LUN fit into subunit (with other information, e.g. partition
> number)?  Looking at the list Paul Vixie posted, it looks like the
> former.

Hmm, I was thinking about the scsi case and came up with this:
major = 12
minor = 20 :
- 4 bits bus
- 4 bits target
- 4 bits lun
- 4 bits slice
- 4 bits partition

To my thinking, device = (bus,target) and subunit = (lun,slice,partition)

I'm trying not to think about Fibre channel devices - from what people
have said about it being able to hold 1000+ devices, a 20 bit minor just
isn't big enough to hold all the information required.

That is, a "unit" is an attachment to the bus and "subunit" is a device
within that attachment.

Darren