Subject: Re: utmp file format change
To: Bill Studenmund <wrstuden@netbsd.org>
From: Andrew Brown <atatat@atatdot.net>
List: tech-userlevel
Date: 09/24/2001 23:26:42
>> >- implement a real userland fs layer that can cope with lseek(2) (and isn't
>> >  a hack layer over the NFS protocol as in sharity-light);
>>
>> i, for one, have always wondered why the portal file system didn't
>> hand back descriptors that could handle a seek.  that seems (to me, at
>> least) like a better thing to "fix".
>
>The problem is that we don't have an fd-based interface (pipes, ptys, etc)
>which will communicate a seek to a program on the other side. So there is
>nothing that portalfs can ship back that will work.

as a matter of trivia, solaris 8 has a file called /etc/mnttab that's
a mount point and contains the list of things currently mounted.  not
quite a kernel interface, but certainly backwards compatible.  solaris
8 also mounts swap on /var/run, even though there's nothing in except
a "thing" called syslog_door.  :)

<wandering type="random">

before i started toying with the portal stuff, i imagined that i'd do
this:

	netbsd/	rfilter	netbsd/	/root/cvs.pl netbsd %s

and then supply a script (/root/cvs.pl) that would suck the desired
stuff out of cvs, stuff it in a file (in, eg, /tmp), and pass back an
open fd to it.  nope.  not quite.  (it'd also be nice if there was a
way to ask open(2) for a file descriptor open on a file on the disk
that had no hard links to it so that space would get deallocated on
close...)

portal can't do that, so clearly that won't suffice for backwards
compatibility to a file like wtmp (or utmp).  reads would work, as
would seeks, but writes would be worthless.  the other problem with
writes is that utmp and wtmp are record based, but there's currently
no enforced restriction on that.

this strikes somewhat, at this point, as the difference between the
block and character interfaces to, eg, disk drives.  which, i guess,
makes it look something like the "sharity light hack" that someone
already mentioned.  the only "problem" is that files aren't currently
mount points.  i guess one could union mount a compat portal daemon
over (under?) /var/log and /var/run...

</wandering>

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."