ArticleslgStudy

computer science

Filesystem in Userspace

Filesystem in Userspace is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Filesystem in Userspace rather than just read about it. In short: 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.

Filesystem in Userspace — main illustration
Filesystem in Userspace — illustration

Key takeaways

  • Filesystem in Userspace belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Filesystem in Userspace to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Filesystem in Userspace from memory before moving on to harder problems.

Reference excerpt

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, MorphOS (as filesysbox.library), and Windows. FUSE is free software originally released under the terms of the GNU General Public License and the GNU Lesser General Public License.

History Plan 9 users have a ftpfs command that will connect to a ftp server, populate remote files in their name space, and translate 9p operations into ftp operations. This allows standard utilities (grep, sed, etc.) to work directly on remote files. Since then, several implementations of ftpfs and sshfs have appeared. The FUSE system was originally part of AVFS (A Virtual Filesystem), a filesystem implementation heavily influenced by the translator concept of the GNU Hurd. 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 and released under the terms of Simplified BSD license. An ISC-licensed re-implementation by Sylvestre Gallon was released in March 2013, and incorporated into OpenBSD in June 2013. FUSE was merged into the mainstream Linux kernel tree in kernel version 2.6.14.(2005) 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. 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. 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.

Ports, forks and reimplementations The version of FUSE for Mac OS X has too many differences for sharing the same library as regular libfuse systems. It was started as Google's MacFUSE in 2009 and forked as OSXFUSE in 2011 by Benjamin Fleischer. OSXFUSE was rebranded as macFUSE in 2020 following the rebrand of Mac OS X to macOS. The modern macFUSE consists of a closed-source kernel extension and three open-source userspace libraries: a fork of libfuse2, a fork of libfuse3 and an Objective-C framework for accessing macFUSE-specific functionality. The last fully open-source release was OSXFUSE 3.8.3 of 2018. WinFsp is a userspace filesystem driver interface for Windows released under GPLv3. It implements the libfuse2 and libfuse3 C APIs in addition to its own APIs for C and .NET. OpenHarmony uses a fork of libfuse3 as a "third-party component" with minimal modification. It is unclear whether this inclusion is only for the Linux kernel-based branches of OpenHarmony (which would be trivial) or also for their custom LiteOS and UniProton kernels.

Operation and usage

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.

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. The version of FUSE in Linux kernel includes various optional features that can be enabled to improve performance, including writeback (as opposed to write-through) caching and I/O passthrough.

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.

Linear Tape File System: Allows files stored on magnetic tape to be accessed in a similar fashion to those on disk or removable flash drives. NTFS-3G and Captive NTFS, allowing access to NTFS filesystems. retro-fuse: retro-fuse is a user-space filesystem that provides a way to mount filesystems created by ancient Unix systems on modern OSes. The current version of retro-fuse supports mounting filesystems created by Fifth, Sixth and Seventh Edition of Research Unix from Bell Labs, as well as 2.9BSD and 2.11BSD based systems.

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

EncFS: Encrypted virtual filesystem FuseCompress, gzipfs, Fuse-ZIP, CompFUSEd: Compressed virtual filesystems Archive filesystems may also perform this task

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

archivemount Atlas (Rubrik backup software): Immutable, distributed filesystem used by Rubrik Cloud Data Management data protection applications Borg (backup software): Deduplicating backup program that allows backup archives to be mounted as FUSE filesystems. Restic: Free, fast, efficient and secure backup software uses FUSE to be able to browse all of your backup snapshots as a regular file system SPFS A file system for Spectrum Protect, designed to mount the backup server filespace anywhere on your server, and use the features included from the backup server (encryption, de-duplication, compression, filtering etc.). This is a WORM file system.

… excerpt ends here. Continue reading the full article.

Illustrations

Filesystem in Userspace: Unmounting a FUSE-based file system with the fusermount command
Unmounting a FUSE-based file system with the fusermount command

Worked examples

Example 1 — a first encounter with Filesystem in Userspace

Start with the simplest possible case. Write down what Filesystem in Userspace claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Filesystem in Userspace before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Filesystem in Userspace ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Filesystem in Userspace

In research
Filesystem in Userspace appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Filesystem in Userspace in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Filesystem in Userspace is common in secondary-school and first-year university syllabi. It links to neighbouring topics Free software programmed in C, Free special-purpose file systems, Linux kernel features, so understanding it makes those chapters shorter.
In everyday life
Look for Filesystem in Userspace outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Filesystem in Userspace” →

How to study Filesystem in Userspace in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Filesystem in Userspace means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Filesystem in Userspace out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Filesystem in Userspace in simple terms?

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…

Why does Filesystem in Userspace matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Filesystem in Userspace?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Filesystem in Userspace.

Tags

  • Free software programmed in C
  • Free special-purpose file systems
  • Linux kernel features
  • Software that uses Meson
  • Software using the GNU General Public License
  • Unix file system-related software
  • Userspace file systems

Keep exploring