Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Apr 95 11:28:16 MDT
From:      terry@cs.weber.edu (Terry Lambert)
To:        bde@zeta.org.au (Bruce Evans)
Cc:        julian@ref.tfs.com, rgrimes@gndrsh.aac.dev.com, hackers@FreeBSD.org
Subject:   Re: [DEVFS] your opinions sought!
Message-ID:  <9504191728.AA19041@cs.weber.edu>
In-Reply-To: <199504190830.SAA28041@godzilla.zeta.org.au> from "Bruce Evans" at Apr 19, 95 06:30:55 pm

next in thread | previous in thread | raw e-mail | index | archive | help
[ ... mount time reconfig of devs ... ]

> Programs should use canonical names so the user can't decide everything
> here.

Agree.  Reconfig is bad.  Think of /etc/fstab.

> >I personally have always prefered the flat scheme of /dev (with possible
> >exceptions for /dev/fd/*).  This is a religious issue, I have spoken my
> >religion.
> 
> I like it fairly flat.  There certainly shouldn't be subdirectories for
> pieces of one device.

I agree; there *should* be a depth to get more information about the
device (built into the name selector); it shouldn't be too deep.

The problem with depth is resoloution of the devices.  Any depth over
1 requires either a flag recursion on lookup (vn_lookup is basically
a loop-unrolled recursive descent), OR an exceedingly complex reverse
mapping system based on the inode number (and we are back to name
space pollution by minor number).

I think there is an argument to be made for a depth of 2 for drivers
that have a distinction between "controller" and "device attached to
controller".  This is the multiport serial board and the disk controller
issue.  It is also (potentially) the sound board issue, if a sound board
is considered a controller with devices attached.

I think there is potential argument to be made for another heirarchy
depth to represent partitions/extended partitions in the case of DOS
awar systems.  The partitioning code is a logically seperate entity
from the slice code, and it should be removable.

> >> The naming is not implimented yet because it would be the 
> >> responsibility of the SLICE code to do the naming.. the DEVFS
> >> doesn't care..
> >> it just shows what it's told to show by the device driver (or the slice
> >> code in this case).
> 
> /dev/driver_name/all_devices_handled_by_this_drive_in_one_directory  is
> easiest for drivers, but not quite what is wanted by programs.  How
> should ps find and name tty devices?  There aren't enough letters for a
> 2 letter namespace.

3 is 1000 using digits only, or 36^3 for digits + lower case letters.
2 is 26^2 for digits + lower case letters.


					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?9504191728.AA19041>