Re: FS idea

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Wed, 16 Sep 1998 15:10:19 +0200 (CEST)


On Tue, 15 Sep 1998, Theodore Y. Ts'o wrote:
> Date: Tue, 15 Sep 1998 21:09:53 -0400
> From: David Feuer <feuer@his.com>
>
> I think it would be nice to add in a kernel feature to allow the kernel
> to interface with userspace programs to provide fs support for certain
> filesystems. There are three kinds of filesystems that (in my opinion)
> this would be really nice for.
>
> No, no, this isn't rediculous. There was a userfs early in the Linux
> kernel history, but it wasn't quite stable and was never finished.

It also doesn't work anymore because the kernel VFS interface
changed somewhat. Things seem to have stabilized now, so it
would be entirely possible to program a new userfs for 2.2.x
kernels (the old one must be messy by now, since it survived
the 1.1 -> 1.2 -> 1.3 kernel changes).

> The kind of hook I'm looking for would probably fit best in the loopback
> driver, in my opinion.
>
> It wouldn't work there because the loopback driver is a block device,

You must look at the VFS interface instead, and look at which
interfaces a filesystem needs to export. Then you can think
up some interface through which the kernel can communicate the
VFS calls to a usermode program. From there on, things get
trivial... (or they should, if the design is properly done)

> It's not *that* hard to do, but it would have some performance
> limitations (which might not matter, in some cases).

This should be acceptable for things like tape filesystems
and internet pseudo FSes. It's also nice for some FSes where
you want the caching to be done on swap instead of reloading
the original stuff. Maybe this would also be the way to implement
HSM for Linux... (but then we'd take a block device as cache)

Rik.
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/