Subject: Re: devfs, was Re: ptyfs fully working now...
To: Christos Zoulas <firstname.lastname@example.org>
From: Bill Studenmund <email@example.com>
Date: 11/14/2004 13:52:18
Content-Type: text/plain; charset=us-ascii
On Sun, Nov 14, 2004 at 04:33:09PM -0500, Christos Zoulas wrote:
> On Nov 14, 1:13pm, firstname.lastname@example.org (Bill Studenmund) wrote:
> -- Subject: Re: devfs, was Re: ptyfs fully working now...
> | When we transition to wedges, I think we REALLY REALLY need devfs. I do
> | not think that wedge minor numbers will be stable (or it will be harder=
> | keep them stable) across boot, and so if we jump to devfs at the same t=
> | (or before), life will be easier.
> | Also, for the same reason that init needs /dev/console, I think we need=
> | devfs to be mounted before init starts.
> For what devices? The disks? As init can create /dev/console it can proba=
> mount devfs. I would prefer though to be done later in the rc process.
Why? We need it before we can try mounting "critical" file systems, so we=
can't delay it long. And I don't see any benefit to waiting; I don't see=20
what we would want to do strictly before mounting devfs, and we also would=
be adding a new dependency to the rc scripts - we need to know what ones=20
need devices around.
If you can help me see what we would do, I can either try to think of a=20
different way to do it, or I can admit your right. :-)
> | What benefit is there for not using devfs once we have transitioned to =
> | (both as a project and at a given installation)?
> Nothing, once we've transitioned to it. I think that for the transition
> period though, we'll have to be able to run both with and without.
I suspect that that transition period will really just be for the=20
developers actively working on devfs. Once we push it into current (or=20
once we turn its mount in init or whatever on), I think we need to run=20
with it. :-)
> | My thought is that when devfs mounts (even when the kernel or init=3D20
> | automounts it), the mountfrom name is taken as the base name for two fi=
> | =3D20
> | names, and both are opened by the kernel code. devfs then looks at the=
> | newer of the two files. If it passes db consistency checks (looks like =
> | good file, no bogus lengths, etc.), then it is the one that gets read i=
> | =3D20
> | the running devfs. If it fails (either botched up, or doesn't exist), w=
> | look at the other, old file. If it passes, we use it (chances are there=
> | was an update issue). If it too doesn't work out, we just run with the=
> | node defaults.
> | Then when we need to save out the database, we overwrite the older of t=
> | =3D20
> | two files. Thus we will (should) always have a good version of the db=
> | around.
> That is a good idea (having 2 files around).
> | Another thing I think we'd need is a tool that you can point at a=3D20
> | directory (an existing /dev) and it'll generate a db file.
> I think the easiest is to let the kernel do it, since it knows how. We
> just make a device node entry /dev/devdb, and we cat /dev/devdb > foo.db.
For generating copies, that would be fine. Infact that might be a great=20
way to do it.
Another thing I had in mind was (eventually) being able to support devfs=20
mount updates. For instance, I think it would be reasonable to permit=20
changing what files are used as the devfs database - mount -t devfs -u=20
/new/file/location /dev should work. I'm not certain if the new file=20
should change current settings, or if it should just be a destination for=
Oh, the tool I had in mind was for sysinst & such. You point it at your=20
current /dev, and it generates the db file needed to transition to it.=20
Thus you can preserve your settings (both name and permission) when you=20
make the transition to devfs.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
-----END PGP SIGNATURE-----