tech-userlevel archive

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

FUSE support improvements


We currently support FUSE through the refuse(3) library, which
reimplements the FUSE API on top of NetBSD native PUFFS.

This is not enough. Many filesystems use an alternative FUSE low
level interface, which is provided by libfuse. Some even directly
open /dev/fuse and use the FUSE kernel interface, bypassing libfuse
completely (glusterfs seems to do that). NetBSD cannot currently
support any of thoses filesystems.

Here comes libperfuse(3) and perfused(8). perfused(8) creates a
/dev/fuse socket and offers a FUSE kernel interface over it. It
will relay PUFFS requests to FUSE requests so that anything that
uses the FUSE kernel interface can work on NetBSD. This includes
filesystems using /dev/fuse directly, but also libfuse itself. That
way, we also support the FUSE low level and high level APIs (the
latter being already supported by refuse(3)).

libperfuse(3) provides open(2) and mount(2) wrappers that will
setup the communication between the FUSE filesystem and perfused(8).
A FUSE filesystem can be modified to use perfuse by just adding an
#include <perfuse.h> in the source file that opens /dev/fuse and
does the mount, and by linking with -lperfuse.

libperfuse(3) also implements all the PUFFS to FUSE logic, while
perfused(8) only takes care of data movement from and to /dev/fuse.
The reason for that is that in the future, we may want to reduce
data movement by loading the PUFFS to FUSE logic within the same
process as the FUSE filesystem.  This is not possible right now,
because libperfuse uses libpuffs, which is not thread safe. This
will change.

The code is functionnal but still awork in progress. I can run 
NetBSD's in a FUSE loopback filesystem using it. It 
runs for about 15 minutes before cusing a kernel panic (probably
a kernel bug). I plan to import it soon, if nobody complain loudly 
about it. The next step will be to commit patches in pkgsrc so 
that libfuse use libperfuse(3).

Here is the code for review:

And for anyone curious, perfuse stantds for PUFFS Enabled Relay 
to FUSE.

Emmanuel Dreyfus

Home | Main Index | Thread Index | Old Index