fuse (4) - Linux Manuals
fuse: Filesystem in Userspace (FUSE) device
NAME
fuse - Filesystem in Userspace (FUSE) device
SYNOPSIS
#include <linux/fuse.h>
DESCRIPTION
This device is the primary interface between the FUSE filesystem driver and a user-space process wishing to provide the filesystem (referred to in the rest of this manual page as the filesystem daemon). This manual page is intended for those interested in understanding the kernel interface itself. Those implementing a FUSE filesystem may wish to make use of a user-space library such as libfuse that abstracts away the low-level interface.At its core, FUSE is a simple client-server protocol, in which the Linux kernel is the client and the daemon is the server. After obtaining a file descriptor for this device, the daemon may read(2) requests from that file descriptor and is expected to write(2) back its replies. It is important to note that a file descriptor is associated with a unique FUSE filesystem. In particular, opening a second copy of this device, will not allow access to resources created through the first file descriptor (and vice versa).
The basic protocol
Every message that is read by the daemon begins with a header described by the following structure:
struct fuse_in_header {
The header is followed by a variable-length data portion
(which may be empty) specific to the requested operation
(the requested operation is indicated by
opcode).
The daemon should then process the request and if applicable send
a reply (almost all operations require a reply; if they do not,
this is documented below), by performing a
write(2)
to the file descriptor.
All replies must start with the following header:
struct fuse_out_header {
This header is also followed by (potentially empty) variable-sized
data depending on the executed request.
However, if the reply is an error reply (i.e.,
error
is set),
then no further payload data should be sent, independent of the request.
Exchanged messages
This section should contain documentation for each of the messages
in the protocol.
This manual page is currently incomplete,
so not all messages are documented.
For each message, first the struct sent by the kernel is given,
followed by a description of the semantics of the message.