tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Support for kernel and lowlevel FUSE API



Hello

FUSE has 3 levels of API: 
- The high level library API, which NetBSD supports through librefuse.
- The low level library API, not supported in NetBSD.
- the kernel API (/dev/fuse), not supported in NetBSD.

I have been looking for a fault tolérant network filesystem, and my
conslusion is that FUSE support in NetBSD is a major showstopper. 
Many filesystems use the low level API (MooseFS, CloudStore), 
and some even bypass libfuse and use the kernel API (glusterFS is
in this situation).

After a few exchanges with pooka@, it was clear that the path of
least resistance was to implement a userland-base PUFFS to FUSE
relay. I gave it a try with some success. Here is the situation so
far:

- There is a daemon called perfused (PUFFS Enabled Relay to FUSE, 
of course), which opens a /dev/fuse socket and wait for filesystems
to connect there. It will relay kernel requests to the filesystem, 
and filesystems replies to the kernel.

- The filesystem needs a minor modification: it needs to call 
perfuse_mount() instead of mount(). perfuse_mount() sends a message
through /dev/fuse to perfused, and perfused does the actual mount. 
I implemented perfuse_mount() in a single-function library (libperfuse).

Most of the time, the filesystem does the mount() through libfuse or
usermount(1), therefore we have many situation where a filesystem can
be used unmodified, provided libfuse and/or usermount have been patched.

So far, it mostly works. I have been able to build libfuse  and its 
example filesystems, and use them. There is loopback filesystem witch
is convenient for testing. Of course, pooka@ probably has dozens of
evil shell one-liners that will exhibit bad behavior, but there is 
nothing impossible to fix here.

Now the big question: should libperfuse and perfused be imported in-tree.
pooka@ think they should, as any modification in the VFS should be
quickly reflected there. 

On the other hand, perfused just implements the kernel level APIi, and
many programs use the libfuse low level API. In order to support
theses programs, we may also want import libfuse. I am not sure everyone
would enjoy the idea.

Any opinions on what should go in tree?

-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index