From owner-freebsd-hackers Wed Apr 19 10:36:03 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id KAA24496 for hackers-outgoing; Wed, 19 Apr 1995 10:36:03 -0700 Received: from cs.weber.edu (cs.weber.edu [137.190.16.16]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id KAA24486 for ; Wed, 19 Apr 1995 10:36:01 -0700 Received: by cs.weber.edu (4.1/SMI-4.1.1) id AA19041; Wed, 19 Apr 95 11:28:17 MDT From: terry@cs.weber.edu (Terry Lambert) Message-Id: <9504191728.AA19041@cs.weber.edu> Subject: Re: [DEVFS] your opinions sought! To: bde@zeta.org.au (Bruce Evans) Date: Wed, 19 Apr 95 11:28:16 MDT Cc: julian@ref.tfs.com, rgrimes@gndrsh.aac.dev.com, hackers@FreeBSD.org In-Reply-To: <199504190830.SAA28041@godzilla.zeta.org.au> from "Bruce Evans" at Apr 19, 95 06:30:55 pm X-Mailer: ELM [version 2.4dev PL52] Sender: hackers-owner@FreeBSD.org Precedence: bulk [ ... 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.