FUSEFS(4)

πŸ“¦ version 15.1, in freebsd 15.1, nixpkgs unstable

πŸ’… FUSEFS(4) β€” like, the whole vibe πŸ’…

okay so real talk bestie, this is page 4 of the Kernel Interfaces Manual (yep, FUSEFS(4), that's the one) and it's genuinely one of the coolest little corners of the kernel. sit down, grab a strawberry πŸ“, we're learning about file systems that live in userspace.


✨ NAME ✨

fusefs β€” File system in USErspace πŸ¦‹ (yes the capitalisation is the joke, we love a self-aware acronym)


πŸŽ€ SYNOPSIS πŸŽ€

so there are two ways to get this baby into your life:

to link into the kernel:

options FUSEFS

to load as a loadable kernel module:

kldload fusefs

pick your fighter, both slay πŸ’…


🌸 DESCRIPTION 🌸

The fusefs driver implements a file system that is serviced by a userspace program. read that again. the file system is handled by a program in userspace. it's giving main character energy fr fr πŸ”₯

There are many uses for fusefs. Userspace daemons can access libraries or programming languages that cannot run in kernel-mode, for example. fusefs is also useful for developing and debugging file systems, because a crash of the daemon will not take down the entire operating system. (not me reading that and gasping β€” a crash that doesn't nuke everything?? iconic 🫢)

Finally, the fusefs API is portable. Many daemons can run on multiple operating systems with minimal modifications. lowkey the whole point honestly, iykyk


⭐ SYSCTL VARIABLES ⭐

The following sysctl(8) variables are available β€” yes bestie, we're listing all of them, don't scroll 😀

  • vfs.fusefs.kernelabi_major β€” Major version of the FUSE kernel ABI supported by this driver.
  • vfs.fusefs.kernelabi_minor β€” Minor version of the FUSE kernel ABI supported by this driver.
  • vfs.fusefs.data_cache_mode β€” Controls how fusefs will cache file data for pre-7.23 file systems. the tea β˜•:
    • A value of 0 will disable caching entirely. Every data access will be forwarded to the daemon.
    • A value of 1 will select write-through caching. Reads will be cached in the VFS layer as usual. Writes will be immediately forwarded to the daemon, and also added to the cache.
    • A value of 2 will select write-back caching. Reads and writes will both be cached, and writes will occasionally be flushed to the daemon by the page daemon. Write-back caching is usually unsafe, especially for FUSE file systems that require network access. πŸ’€
🚨 heads up bestie: FUSE file systems using protocol 7.23 or later specify their cache behavior on a per-mountpoint basis, ignoring this sysctl. so don't come for this variable if it's not doing anything, it's literally not its fault.
  • vfs.fusefs.stats.filehandle_count β€” Current number of open FUSE file handles.
  • vfs.fusefs.stats.lookup_cache_hits β€” Total number of lookup cache hits.
  • vfs.fusefs.stats.lookup_cache_misses β€” Total number of lookup cache misses.
  • vfs.fusefs.stats.node_count β€” Current number of allocated FUSE vnodes.
  • vfs.fusefs.stats.ticket_count β€” Current number of allocated FUSE tickets, which is roughly equal to the number of FUSE operations currently being processed by daemons. (roughly!! don't @ me)

πŸ” SEE ALSO πŸ”


🌈 HISTORY 🌈

The fuse driver was written as the part of the FreeBSD implementation of the FUSE userspace file system framework (see https://github.com/libfuse/libfuse) and first appeared in the sysutils/fusefs-kmod port, supporting FreeBSD 6.0. It was added to the base system in FreeBSD 10.0, and renamed to fusefs for FreeBSD 12.1. glow-up of the century honestly πŸ‘‘


πŸ‘‘ AUTHORS πŸ‘‘

The fuse driver was originally written by Csaba Henk as a Google Summer of Code project in 2005. It was further developed by Ilya Putsikau during Google Summer of Code 2011, and that version was integrated into the base system by Attilio Rao <attilio@FreeBSD.org>.

This manual page was written by Alan Somers <asomers@FreeBSD.org>.


okay that's the whole page, you ate that πŸ“βœ¨ no cap, you now know more about userspace file systems than like 90% of people. periodt.

πŸ’œ cute little sign-off: this gem dropped on July 31, 2019, from the Debian side of things, and the page itself is FUSEFS(4). screenshot it, frame it, whatever, it's yours now πŸŽ€
πŸ“¦ where this page comes from