Subject: Re: representation of persistent device status, was Re: devfs, was Re: ptyfs...
To: Chapman Flack <>
From: Bill Studenmund <>
List: tech-kern
Date: 11/18/2004 18:06:02
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Nov 18, 2004 at 02:13:26PM -0500, Chapman Flack wrote:
> Bill Studenmund writes:
> > I uesd to think some idea using on-disk device nodes would work, but I
> > don't anymore. Why shouldn't we just synthesize the whole thing from
> > scratch?
> The answer to the last question is, obviously, that we need ownership and
> mode changes to be persistent.  Any solution is going to have to provide
> some form of persistence for those data, with update integrity and recove=
> The central question in this thread is the representation for the persist=
> data.  Eric's suggestion was one possible representation; other suggestio=
> have included a text file stored beneath the mount point, and binary files
> containing similar information.  Some of the tradeoffs have already been
> covered.

Uhm, I'm the person championing the binary file approach, so "synthesizing=
from scratch" will, at least for what I'm talking about, retain=20
persistence info.

> I think you're spot on when you point out there are two namespaces.  Part
> of what we need to maintain in some persistent store is the mapping betwe=
> them.  (For some devices you won't care.  But for some you will want to
> assure that the same node name is reliably associated with the same devic=
> That mapping will be done in the kernel or out of it (those are the two
> obvious choices).  Doing it in the kernel requires making the node-name-s=
> visible in kernel-land, say by a suitable extension of config(9) language
> that allows expressing node names.  Doing it out of the kernel, conversel=
> requires making the driver-locator-name-space visible in user-land, say by
> a convention for canonical locator-based names in a devfs a la Solaris.
> (It was pointed out earlier that there's really a third approach, which is
> to invent a third namespace like dev_t that must be mapped in both direct=
> but I think we agree part of the point of a devfs is to get rid of that
> complexifying layer.)

No one is very interested in the userland-exposed option.

What Christos and I were discussing is doing the node-namespace=20
manipulation in devfs, and saving the file in the (root) file system.

> The difficulties you point out with renaming and so on are not difficulti=
> with any one choice of representation for the persistent owner/status dat=
> they will be consequences of any scheme that fails to provide a reliable =
> to name things in locator-space, regardless of the concrete representatio=
> So it's a side issue as far as representation choice is concerned.

Actually, I don't think it's a side issue. I think the issues are due to=20
being sloppy about the name spaces. The representation initially discussed=
was rather sloppy about representations, and so the complaint is not a=20
side issue.

Take care,


Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.3 (NetBSD)