OpenBSD xfs noofs

Tomas Olsson tol at stacken.kth.se
Thu Nov 17 02:07:28 CET 2005


Pailloncy Jean-Gerard <jg at rilk.com> writes:
> Running thru the doc, I see that the xfs is a generic interface to
> send to a userland process all the call of the vfs layer. So I do not
> need to write a kernel driver.
>
xfs/nnpfs operates only on cache files on a local filesystem, so as long as
you can live with that extra step it should work. The other classic
solution is to make your daemon implement an nfs server that you can
loopback mount.

> I would appreciate some help to start to write the dameon.
>
I've heard several people doing small projects like this, it would be nice
if we could find some example code for future projects to look at. If
possible, please share what you come up with, even if it is not fully
functional.

Any code out there? I know Keso has several versions...
And http://www.0x90.org/~christopher/xfs/ may help some.

The normal way is to start with arlad (is it "afsd" in OpenBSD?), use a few
relevant snippets and ignore the AFS backend etc. Interesting files are
messages.c, xfs.c and kernel.c. You need to create directories (at least a
simple root for starters) in BSD dirent format, see bsd-subr.c.

I think a reasonable "hello world" (ls /yourroot) needs a VERSION message
exchange, followed by INSTALLROOT and INSTALLDATA for that node. xfs is
likely to ask for them (GETROOT and GETDATA). I haven't tried this, so
there may be more needed. You'll probably want to do 'fs xfsdeb all' to see
what's going on in the kernel.

And yes, if the idea is to keep things simple I would start by using what
is in OpenBSD today. First things first.

/t (looking forward to progress reports and more questions)





More information about the Arla-drinkers mailing list