This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed.Find sources: "Filesystem in Userspace" – news · newspapers · books · scholar · JSTOR (January 2024) (Learn how and when to remove this template message)
Filesystem in Userspace
Stable release
3.16.2[1] Edit this on Wikidata / 10 October 2023; 5 months ago (10 October 2023)
Repository
Written inC
Operating systemUnix, Unix-like
TypeFile system driver
LicenseGPL for Linux kernel part, LGPL for Libfuse, Simplified BSD on FreeBSD, ISC license on OpenBSD; proprietary for macOS
Websitegithub.com/libfuse/libfuse

Filesystem in Userspace (FUSE) is a software interface for Unix and Unix-like computer operating systems that lets non-privileged users create their own file systems without editing kernel code. This is achieved by running file system code in user space while the FUSE module provides only a bridge to the actual kernel interfaces.

FUSE is available for Linux, FreeBSD, OpenBSD, NetBSD (as puffs), OpenSolaris, Minix 3, macOS,[2] and Windows.[3]

FUSE is free software originally released under the terms of the GNU General Public License and the GNU Lesser General Public License.

History

The FUSE system was originally part of AVFS (A Virtual Filesystem), a filesystem implementation heavily influenced by the translator concept of the GNU Hurd.[4] It superseded Linux Userland Filesystem, and provided a translational interface using lufis in libfuse1.

FUSE was originally released under the terms of the GNU General Public License and the GNU Lesser General Public License, later also reimplemented as part of the FreeBSD base system[5] and released under the terms of Simplified BSD license. An ISC-licensed re-implementation by Sylvestre Gallon was released in March 2013,[6] and incorporated into OpenBSD in June 2013.[7]

FUSE was merged into the mainstream Linux kernel tree in kernel version 2.6.14.[8]

The userspace side of FUSE, the libfuse library, generally followed the pace of Linux kernel development while maintaining "best effort" compatibility with BSD descendants. This is possible because the kernel FUSE reports its own "feature levels", or versions. The exception is the FUSE fork for macOS, OSXFUSE, which has too many differences for sharing a library.[9] A break in libfuse history is libfuse3, which includes some incompatible improvements in the interface and performance, compared to the older libfuse2 now under maintenance mode.[10]

As the kernel-userspace protocol of FUSE is versioned and public, a programmer can choose to use a different piece of code in place of libfuse and still communicate with the kernel's FUSE facilities. On the other hand, libfuse and its many ports provide a portable high-level interface that may be implemented on a system without a "FUSE" facility.

Operation and usage

A flow-chart diagram showing how FUSE works: Request from userspace to list files (ls -l /tmp/fuse) gets redirected by the Kernel through VFS to FUSE. FUSE then executes the registered handler program (./hello) and passes it the request (ls -l /tmp/fuse). The handler program returns a response back to FUSE which is then redirected to the userspace program that originally made the request.

To implement a new file system, a handler program linked to the supplied libfuse library needs to be written. The main purpose of this program is to specify how the file system is to respond to read/write/stat requests. The program is also used to mount the new file system. At the time the file system is mounted, the handler is registered with the kernel. If a user now issues read/write/stat requests for this newly mounted file system, the kernel forwards these IO-requests to the handler and then sends the handler's response back to the user.

Unmounting a FUSE-based file system with the fusermount command

FUSE is particularly useful for writing virtual file systems. Unlike traditional file systems that essentially work with data on mass storage, virtual filesystems don't actually store data themselves. They act as a view or translation of an existing file system or storage device.

In principle, any resource available to a FUSE implementation can be exported as a file system.

Applications

On-disk file systems

Conventional on-disk file systems can be implemented in user space with FUSE, e.g. for compatibility or licensing reasons.

Layering file systems

FUSE filesystems can create a view of an underlying file system, transforming the files in some way.

Archive and backup file systems

FUSE filesystems can expose the contents of archives or backup sets without having to first extract them.

Remote/distributed file system clients

Other

See also

References

  1. ^ "Release 3.16.2". 10 October 2023. Retrieved 19 October 2023.
  2. ^ "Home - FUSE for OS X".
  3. ^ Zissimopoulos, Bill (2021-02-14), billziss-gh/winfsp, retrieved 2021-02-16
  4. ^ "Some technical advantages of the Hurd". May 15, 2011. Retrieved March 28, 2016.
  5. ^ "WhatsNew/FreeBSD10 - FreeBSD Wiki".
  6. ^ "openbsd dev - tech - Fuse (and sshfs) support for OpenBSD". Archived from the original on 2020-10-26. Retrieved 2013-07-14.
  7. ^ "'CVS: cvs.openbsd.org: src' - MARC".
  8. ^ "file-systems.fuse.devel - FUSE merged to 2.6.14! - msg#00021 - Recent Discussion OSDir.com". Archived from the original on 2016-04-20.
  9. ^ "libfuse/libfuse, the reference implementation of the Linux FUSE (Filesystem in Userspace) interface". libfuse. 9 January 2020. Retrieved 9 January 2020.
  10. ^ "libfuse3 ChangeLog". GitHub. Retrieved 9 January 2020.
  11. ^ "Lustre FreeBSD". Archived from the original on 2008-03-12. Retrieved 2008-03-02.
  12. ^ "Architecture ZFS for Lustre". Sun Microsystems. Archived from the original on 2009-01-22. Retrieved 2008-03-02.
  13. ^ "minio/minfs". GitHub. Retrieved 12 April 2018.