fuse(4) Device Drivers Manual fuse(4) fuse - (FUSE) #include FUSE , ( (filesystem daemon)). , . , FUSE, libfuse, . FUSE - , Linux , -- . , read(2) write(2). , , FUSE, . , , ( ). , , : struct fuse_in_header { uint32_t len; /* Total size of the data, including this header */ uint32_t opcode; /* The kind of operation (see below) */ uint64_t unique; /* A unique identifier for this request */ uint64_t nodeid; /* ID of the filesystem object being operated on */ uint32_t uid; /* UID of the requesting process */ uint32_t gid; /* GID of the requesting process */ uint32_t pid; /* PID of the requesting process */ uint32_t padding; }; The header is followed by a variable-size 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 { uint32_t len; /* Total size of data written to the file descriptor */ int32_t error; /* Any error that occurred (0 if none) */ uint64_t unique; /* The value from the corresponding request */ }; ( ), . , , , (. ., error ), , . . , . , , . FUSE_INIT struct fuse_init_in { uint32_t major; uint32_t minor; uint32_t max_readahead; /* v7.6 */ uint32_t flags; /* v7.6 */ }; , . . , ( ). . 7.26. , . : struct fuse_init_out { uint32_t major; uint32_t minor; uint32_t max_readahead; /* v7.6 */ uint32_t flags; /* v7.6; */ uint16_t max_background; /* v7.13 */ uint16_t congestion_threshold; /* v7.13 */ uint32_t max_write; /* v7.5 */ uint32_t time_gran; /* v7.6 */ uint32_t unused[9]; }; (major) , , , uint32_t major ( ), , . FUSE_INIT, . ( , ), . (minor) , , , . FUSE_GETATTR struct fuse_getattr_in { uint32_t getattr_flags; uint32_t dummy; uint64_t fh; /* , (getattr_flags & FUSE_GETATTR_FH) }; , stat(2) . , , header->nodeid , FUSE_GETATTR_FH, (handle) fh. fstat(2). , . , FUSE_GETATTR . : struct fuse_attr_out { /* ( + ) */ uint64_t attr_valid; uint32_t attr_valid_nsec; uint32_t dummy; struct fuse_attr { uint64_t ino; uint64_t size; uint64_t blocks; uint64_t atime; uint64_t mtime; uint64_t ctime; uint32_t atimensec; uint32_t mtimensec; uint32_t ctimensec; uint32_t mode; uint32_t nlink; uint32_t uid; uint32_t gid; uint32_t rdev; uint32_t blksize; uint32_t padding; } attr; }; FUSE_ACCESS struct fuse_access_in { uint32_t mask; uint32_t padding; }; default_permissions, . , , error ( , -EACCES). FUSE_OPEN FUSE_OPENDIR struct fuse_open_in { uint32_t flags; /* , open(2) */ uint32_t unused; }; , header->nodeid. . , , flags : struct fuse_open_out { uint64_t fh; uint32_t open_flags; uint32_t padding; }; fh (opaque) , . open_flags , : FOPEN_DIRECT_IO . FOPEN_KEEP_CACHE . FOPEN_NONSEEKABLE . FUSE_READ FUSE_READDIR struct fuse_read_in { uint64_t fh; uint64_t offset; uint32_t size; uint32_t read_flags; uint64_t lock_owner; uint32_t flags; uint32_t padding; }; size , offset. . FUSE_INTERRUPT struct fuse_interrupt_in { uint64_t unique; }; , unique. . , . (, EINTR ). FUSE_INTERRUPT. . FUSE_LOOKUP , , header->nodeid. : struct fuse_entry_out { uint64_t nodeid; /* inode */ uint64_t generation; /* inode */ uint64_t entry_valid; uint64_t attr_valid; uint32_t entry_valid_nsec; uint32_t attr_valid_nsec; struct fuse_attr attr; }; nodeid generation . attr FUSE_GETATTR. FUSE_FLUSH struct fuse_flush_in { uint64_t fh; uint32_t unused; uint32_t padding; uint64_t lock_owner; }; (flush) . . , . FUSE_RELEASE FUSE_RELEASEDIR struct fuse_release_in { uint64_t fh; uint32_t flags; uint32_t release_flags; uint64_t lock_owner; }; , FUSE_OPEN FUSE_OPENDIR, . , fh, . , . FUSE_STATFS statfs(2) . . : struct fuse_kstatfs { uint64_t blocks; uint64_t bfree; uint64_t bavail; uint64_t files; uint64_t ffree; uint32_t bsize; uint32_t namelen; uint32_t frsize; uint32_t padding; uint32_t spare[6]; }; struct fuse_statfs_out { struct fuse_kstatfs st; }; statfs(2). E2BIG read(2), FUSE_SETXATTR. EINVAL write(2), . . , unique. EIO read(2), . : , EIO. : o mode & S_IFMT , ; o , . ENODEV read(2) write(2), FUSE . EPERM /dev/fuse, . Linux. : FUSE_BATCH_FORGET FUSE_BMAP FUSE_CREATE FUSE_DESTROY FUSE_FALLOCATE FUSE_FORGET FUSE_FSYNC FUSE_FSYNCDIR FUSE_GETLK FUSE_GETXATTR FUSE_IOCTL FUSE_LINK FUSE_LISTXATTR FUSE_LSEEK FUSE_MKDIR FUSE_MKNOD FUSE_NOTIFY_REPLY FUSE_POLL FUSE_READDIRPLUS FUSE_READLINK FUSE_REMOVEXATTR FUSE_RENAME FUSE_RENAME2 FUSE_RMDIR FUSE_SETATTR FUSE_SETLK FUSE_SETLKW FUSE_SYMLINK FUSE_UNLINK FUSE_WRITE fusermount(1), mount.fuse(8) () Azamat Hackimov , Dmitry Bolkhovskikh , Yuri Kozlov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () . Linux man-pages 6.18 8 2026 . fuse(4)