Subject: Re: Cloning bdev/cdev devices, step one
To: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
From: Bill Studenmund <wrstuden@zembu.com>
List: tech-kern
Date: 07/10/2000 14:42:06
On Mon, 10 Jul 2000, Bill Sommerfeld wrote:

> > But if the dev_t's are dynamic, how does an ffs provide persistence - how
> > would a future boot know what device all of these nodes with permissions
> > were for? i.e. how do we preserve some sort of permanent mapping/labeling
> > of devices?
> 
> "Don't use dev_t".  It would be better if device nodes instead had a
> string in them (containing locators/driver parameters).

I got the, "don't use dev_t" part. :-) So what do we use instead.

You are suggesting a string in the node, and eeh suggested just having
nodes with the right devfs-generated name. Either one is fine in
principle.

Two questions:

What about people wanting to name things differently? Are they out of
luck?

What information do we really need to retain? Just auto-generated name, or
also locators?

This wouldn't be hard to do with an OVERLAY file system. All you need to
do is tweak lookup. Exactly how depends on what we want to do. Mainly
whether or not users/the super user can create nodes.

If no nodes can be created, then we just have lookup only "find"
configured things, and when it finds something, it looks for a node with
needed info underneath.

If nodes can be created, probably the best thing to do is do a lookup, and
look at the returned node. If it's special, then we succeed/fail depending
on the configuration state of the device. Special could be a symlink whose
contents start with a special string, say "@DEVFS" or some such.

Thoughts?

Take care,

Bill