Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Mar 95 10:26:12 MST
From:      terry@cs.weber.edu (Terry Lambert)
To:        bde@zeta.org.au (Bruce Evans)
Cc:        wollman@halloran-eldar.lcs.mit.edu, current@FreeBSD.org, phk@ref.tfs.com, rgrimes@gndrsh.aac.dev.com
Subject:   Re: newfs: sectors per cylinder (4096) disagrees with disk label (36)
Message-ID:  <9503171726.AA28992@cs.weber.edu>
In-Reply-To: <199503170912.TAA12937@godzilla.zeta.org.au> from "Bruce Evans" at Mar 17, 95 07:12:32 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> >The number of devices that must be addressed is the relevent issue,
> >not how one chooses to address them (although adding (n+1)/n times
> >the number of devices does strike me as particularly inelegant).
> 
> 2^24 is plenty of devices!  Naming them right is harder.  I once
> had MAKEDEV generating about 700 disk devices but have reduced that
> to about 200 (27 per unit) by only generating partitions for the
> first BSD partition.  This required naming the first BSD partition
> canonically.  I don't really like this - it's like renumbering
> SCSI devices.

OK, I guess I was getting ahead of myself by assuming a linearly
expanding Nd matrix with direct bit assignments.

That does result in certain selection bits being stolen so as to
reduce the number of total devices.

This is probably an unfounded assumption, since it is predicated
on how I think device address spaces should be apportioned and the
fact that I believe that it is a Good Thing(tm) to lock down device
addresses for anything that might be in an fstab.

Call me a geek with a disk drive, a removable disk, and another
disk drive, where you don't necessarily power on the middle device
unless you plan on using it.  8-).


I think the N dimensional matrix is the way to go, with the bits
being dimensions.

I'd steal fully half of the available bits for single instance
devices like "the controller" and "the whole drive".

I guess you *could* slip these in as bits in the largest dimension
instead of the smallest and save a lot of devices there.

(ie: 2 * 9 < 3 * 8, but 2 * 16 == 4 * 8).


I think your device creation problems get solved by cloning and use
of a devfs exposed as a /dev in the file system name space.

That and a directory heirarchy per dimension would probably resolve
the issues nicely, no matter what the underlying distribution of
minor numbers.

/dev/scsi/controller/target[/lun][/DOS_PARTITION][/BSD_SLICE]

Or something similar...

Actually, the entire concept of major/minor goes out the window,
since they are simply abstractions for use by specfs.  You would
simply resolve to a vnode and return it directly.

Applications wanting name cannonization (rmt, pty) could use
symbolic links or be rewritten to clone.


					Terry Lambert
					terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9503171726.AA28992>