2013-06-21 01:18:18 +08:00
|
|
|
/*!
|
2016-10-29 11:44:39 +08:00
|
|
|
\mainpage libfuse API documentation
|
2013-06-21 01:18:18 +08:00
|
|
|
|
2016-10-29 11:44:39 +08:00
|
|
|
FUSE (Filesystem in Userspace) is an interface for userspace programs
|
|
|
|
to export a filesystem to the Linux kernel. The FUSE project consists
|
|
|
|
of two components: the *fuse* kernel module (maintained in the regular
|
|
|
|
kernel repositories) and the *libfuse* userspace library. libfuse
|
|
|
|
provides the reference implementation for communicating with the FUSE
|
|
|
|
kernel module.
|
2013-06-21 01:18:18 +08:00
|
|
|
|
2016-10-29 11:44:39 +08:00
|
|
|
A FUSE file system is typically implemented as a standalone
|
|
|
|
application that links with libfuse. libfuse provides functions to
|
|
|
|
mount the file system, unmount it, read requests from the kernel, and
|
|
|
|
send responses back.
|
2013-06-21 01:18:18 +08:00
|
|
|
|
|
|
|
|
2016-11-07 13:53:28 +08:00
|
|
|
## Getting started ##
|
2013-06-21 01:18:18 +08:00
|
|
|
|
2016-10-29 11:44:39 +08:00
|
|
|
libfuse offers two APIs: a "high-level", synchronous API, and a
|
|
|
|
"low-level" asynchronous API. In both cases, incoming requests from
|
|
|
|
the kernel are passed to the main program using callbacks. When using
|
|
|
|
the high-level API, the callbacks may work with file names and paths
|
|
|
|
instead of inodes, and processing of a request finishes when the
|
|
|
|
callback function returns. When using the low-level API, the callbacks
|
|
|
|
must work with inodes and responses must be sent explicitly using a
|
|
|
|
separate set of API functions.
|
2013-06-21 01:18:18 +08:00
|
|
|
|
2016-10-29 11:44:39 +08:00
|
|
|
The high-level API that is primarily specified in fuse.h. The
|
|
|
|
low-level API that is primarily documented in fuse_lowlevel.h.
|
2013-06-21 01:18:18 +08:00
|
|
|
|
2016-11-07 13:53:28 +08:00
|
|
|
## Examples ##
|
2013-06-21 01:18:18 +08:00
|
|
|
|
2016-10-29 11:44:39 +08:00
|
|
|
FUSE comes with several examples in the <a
|
|
|
|
href="files.html">examples</a> directory. A good starting point are
|
|
|
|
hello.c (for the high-level API) and hello_ll.c (for the low-level
|
|
|
|
API).
|
2013-06-21 01:18:18 +08:00
|
|
|
|
2017-09-17 16:35:43 +08:00
|
|
|
## FUSE internals ##
|
|
|
|
|
|
|
|
The authoritative source of information about libfuse internals
|
|
|
|
(including the protocol used for communication with the FUSE kernel
|
|
|
|
module) is the source code.
|
|
|
|
|
|
|
|
However, some people have kindly documented different aspects of FUSE
|
|
|
|
in a more beginner friendly way. While this information is
|
|
|
|
increasingly out of date, it still provides a good overview:
|
|
|
|
|
|
|
|
- Bharat Vangoor et al have included an overview of the FUSE internals
|
|
|
|
in a <a href="fast17-vangoor.pdf">paper evaluating FUSE performance</a>.
|
|
|
|
|
|
|
|
- Some documentation of the kernel-userspace protocol is available on
|
|
|
|
the <a href="https://github.com/libfuse/libfuse/wiki/">libfuse wiki</a>.
|
2013-06-21 01:18:18 +08:00
|
|
|
|
|
|
|
*/
|