Messages in this thread | | | Date | Wed, 6 Oct 1999 07:13:53 -0500 (CDT) | From | Peter Samuelson <> | Subject | Re: USB device allocation |
| |
[Nathan Hand <nathanh@chirp.com.au>] > Agreed. Getting rid of devfs (the dynamic filesystem) makes devfs > (the concept of dynamic /dev) more acceptable to more punters, and > honestly doesn't lose all that much functionality.
Que sera sera. I like devfs (the concept of dynamic /dev) but enough important people don't that this may be the best that can be hoped for.
> Modules contact devfsd when they need a node. The daemon > creates/deletes nodes as needed on a real filesystem using the policy > laid out via /etc/devfsd.conf.
If the daemon is deleting nodes upon cleanup_module(), you lose persistence. If it isn't, you lose the advantage of an uncluttered /dev with only current devices in it. With a devfs+devfsd, devfsd can rule the policy organ with an iron fist, squirrel away persistence in /var/state/devfsd, and still maintain the minimalist /dev. The only valid objection left that I see is bloat, and it isn't really that much bloat.
With a real on-disk /dev, manual meddling with /dev nodes cannot be proscribed from on high or even detected (without evil dcache hacks) so devfsd won't know if the user has mucked with /dev directly (i.e. not through /etc/devfsd.conf). If you rename /dev/usbmouse0 to /dev/mouse, then unplug your USB mouse, then plug it back in, how will you keep devfsd from creating another /dev/usbmouse0? Any solutions regarding doing a `find' on /dev in search of the correct major/minor will run afoul of trying to make those dynamic to alleviate the dev number shortage.
Sure, tell the user he has to edit /etc/devfsd.conf rather than changing /dev directly -- and you have now violated the Principle of Least Surprise. The VFS layer doesn't complain if he plays with /dev directly, so why can't you do it? With devfs, you can arrange for the VFS layer to use a warning label of -ENOSYS or -EPERM if you so desire.
> - Devfs gets into the kernel, everyone else in the world is happy.
As I said, if Brave New (Almost-)All-Userspace Devfsd is the only way to satisfy hpa, tytso and the other VIPs, oh well. AIX does it this way and I have to admit that it does work, as long as you like the names and permissions AIX supplies you with.
-- Peter Samuelson <sampo.creighton.edu!psamuels>
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |