hubertf's NetBSD Blog
Send interesting links to hubert at feyrer dot de!
[20070313] Filesystems in User-Space: puffs, refuse vs. FUSE, and more (Updated)

[I'm taking the liberty to post this unquoted here, as I did the editing on the news item, based on input from Antti and Al]

NetBSD now offers full support for running file systems in userspace. The core component inside the kernel that exposes a file system interface towards the userland programs is "puffs", and communicates with vnodes, the kernel's own idea of files. The "libpuffs" library is the interface between userland file systems and the kernel component. To facilitate running the huge amount of file systems already available for the FUSE interface, but not dictate the capabilities of puffs by it, it was decided that FUSE support should be provided as a compatibility layer on top of the native puffs interface. This compatibility is offered by re-fuse, a BSD-licensed re-implementation of FUSE. It is designed to be source code compatible with FUSE, and more information can be found in the refuse(3) manpage.

While puffs is stable for users, the library programming interface and the binary interfaces are still likely to change, and therefore puffs and the dependant librefuse are not built by default. For people tracking -current, the build of all relevant puffs components (librefuse, psshfs, etc.) by "make build" can be enabled by adding "MKPUFFS=yes" to /etc/mk.conf. Using puffs also requires the kernel option "file-system PUFFS", or alternatively loading the puffs.o kernel module, which is included in a puffs-enabled build.

FUSE compatibility was added within pkgsrc, and besides the required infrastructure work a number of FUSE packages were added to pkgsrc in the new "filesystem" category. Example packages that are currently available include:

puffs was originally developed during the Google Summer of Code 2005 "userfs" project by Antti Kantee. It was further polished using funding from the Ulla Tuominen Foundation and committed into the NetBSD source tree in October 2006. The work was presented at AsiaBSDCon 2007 in a paper entitled "puffs - Pass-to-Userspace Framework File System". The "refuse" library was written by Alistair Crooks and committed to NetBSD in February 2007. All components will be available in NetBSD releases starting with NetBSD 5. Work for using FUSE-enabled packages via pkgsrc was done by Juan Romero Pardines following import of the "refuse" library.

For more information, see NetBSD's webpage on file systems in userspace at

Update: An in-depth technical description of puffs was presented at AsiaBSDCon 2007 in a paper entitled "puffs - Pass-to-Userspace Framework File System". The paper and slides are available.

[Tags: , , ]

Disclaimer: All opinion expressed here is purely my own. No responsibility is taken for anything.

Access count: 35234910
Copyright (c) Hubert Feyrer