124 #ifndef _LINUX_FUSE_H 125 #define _LINUX_FUSE_H 128 #include <linux/types.h> 154 #define FUSE_KERNEL_VERSION 7 157 #define FUSE_KERNEL_MINOR_VERSION 27 160 #define FUSE_ROOT_ID 1 184 struct fuse_kstatfs {
197 struct fuse_file_lock {
207 #define FATTR_MODE (1 << 0) 208 #define FATTR_UID (1 << 1) 209 #define FATTR_GID (1 << 2) 210 #define FATTR_SIZE (1 << 3) 211 #define FATTR_ATIME (1 << 4) 212 #define FATTR_MTIME (1 << 5) 213 #define FATTR_FH (1 << 6) 214 #define FATTR_ATIME_NOW (1 << 7) 215 #define FATTR_MTIME_NOW (1 << 8) 216 #define FATTR_LOCKOWNER (1 << 9) 217 #define FATTR_CTIME (1 << 10) 226 #define FOPEN_DIRECT_IO (1 << 0) 227 #define FOPEN_KEEP_CACHE (1 << 1) 228 #define FOPEN_NONSEEKABLE (1 << 2) 256 #define FUSE_ASYNC_READ (1 << 0) 257 #define FUSE_POSIX_LOCKS (1 << 1) 258 #define FUSE_FILE_OPS (1 << 2) 259 #define FUSE_ATOMIC_O_TRUNC (1 << 3) 260 #define FUSE_EXPORT_SUPPORT (1 << 4) 261 #define FUSE_BIG_WRITES (1 << 5) 262 #define FUSE_DONT_MASK (1 << 6) 263 #define FUSE_SPLICE_WRITE (1 << 7) 264 #define FUSE_SPLICE_MOVE (1 << 8) 265 #define FUSE_SPLICE_READ (1 << 9) 266 #define FUSE_FLOCK_LOCKS (1 << 10) 267 #define FUSE_HAS_IOCTL_DIR (1 << 11) 268 #define FUSE_AUTO_INVAL_DATA (1 << 12) 269 #define FUSE_DO_READDIRPLUS (1 << 13) 270 #define FUSE_READDIRPLUS_AUTO (1 << 14) 271 #define FUSE_ASYNC_DIO (1 << 15) 272 #define FUSE_WRITEBACK_CACHE (1 << 16) 273 #define FUSE_NO_OPEN_SUPPORT (1 << 17) 274 #define FUSE_PARALLEL_DIROPS (1 << 18) 275 #define FUSE_HANDLE_KILLPRIV (1 << 19) 276 #define FUSE_POSIX_ACL (1 << 20) 277 #define FUSE_ABORT_ERROR (1 << 21) 284 #define CUSE_UNRESTRICTED_IOCTL (1 << 0) 289 #define FUSE_RELEASE_FLUSH (1 << 0) 290 #define FUSE_RELEASE_FLOCK_UNLOCK (1 << 1) 295 #define FUSE_GETATTR_FH (1 << 0) 300 #define FUSE_LK_FLOCK (1 << 0) 308 #define FUSE_WRITE_CACHE (1 << 0) 309 #define FUSE_WRITE_LOCKOWNER (1 << 1) 314 #define FUSE_READ_LOCKOWNER (1 << 1) 327 #define FUSE_IOCTL_COMPAT (1 << 0) 328 #define FUSE_IOCTL_UNRESTRICTED (1 << 1) 329 #define FUSE_IOCTL_RETRY (1 << 2) 330 #define FUSE_IOCTL_32BIT (1 << 3) 331 #define FUSE_IOCTL_DIR (1 << 4) 333 #define FUSE_IOCTL_MAX_IOV 256 340 #define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0) 347 #define FUSE_FSYNC_FDATASYNC (1 << 0) 371 FUSE_REMOVEXATTR = 24,
376 FUSE_RELEASEDIR = 29,
388 FUSE_NOTIFY_REPLY = 41,
389 FUSE_BATCH_FORGET = 42,
391 FUSE_READDIRPLUS = 44,
394 FUSE_COPY_FILE_RANGE = 47,
400 enum fuse_notify_code {
401 FUSE_NOTIFY_POLL = 1,
402 FUSE_NOTIFY_INVAL_INODE = 2,
403 FUSE_NOTIFY_INVAL_ENTRY = 3,
404 FUSE_NOTIFY_STORE = 4,
405 FUSE_NOTIFY_RETRIEVE = 5,
406 FUSE_NOTIFY_DELETE = 6,
407 FUSE_NOTIFY_CODE_MAX,
411 #define FUSE_MIN_READ_BUFFER 8192 413 #define FUSE_COMPAT_ENTRY_OUT_SIZE 120 415 struct fuse_entry_out {
419 uint64_t entry_valid;
421 uint32_t entry_valid_nsec;
422 uint32_t attr_valid_nsec;
423 struct fuse_attr attr;
426 struct fuse_forget_in {
430 struct fuse_forget_one {
435 struct fuse_batch_forget_in {
440 struct fuse_getattr_in {
441 uint32_t getattr_flags;
446 #define FUSE_COMPAT_ATTR_OUT_SIZE 96 448 struct fuse_attr_out {
450 uint32_t attr_valid_nsec;
452 struct fuse_attr attr;
455 #define FUSE_COMPAT_MKNOD_IN_SIZE 8 457 struct fuse_mknod_in {
464 struct fuse_mkdir_in {
469 struct fuse_rename_in {
473 struct fuse_rename2_in {
479 struct fuse_link_in {
483 struct fuse_setattr_in {
502 struct fuse_open_in {
507 struct fuse_create_in {
514 struct fuse_open_out {
520 struct fuse_release_in {
523 uint32_t release_flags;
527 struct fuse_flush_in {
534 struct fuse_read_in {
544 #define FUSE_COMPAT_WRITE_IN_SIZE 24 546 struct fuse_write_in {
550 uint32_t write_flags;
556 struct fuse_write_out {
561 #define FUSE_COMPAT_STATFS_SIZE 48 563 struct fuse_statfs_out {
564 struct fuse_kstatfs st;
567 struct fuse_fsync_in {
569 uint32_t fsync_flags;
573 struct fuse_setxattr_in {
578 struct fuse_getxattr_in {
583 struct fuse_getxattr_out {
591 struct fuse_file_lock lk;
597 struct fuse_file_lock lk;
600 struct fuse_access_in {
605 struct fuse_init_in {
608 uint32_t max_readahead;
612 #define FUSE_COMPAT_INIT_OUT_SIZE 8 613 #define FUSE_COMPAT_22_INIT_OUT_SIZE 24 615 struct fuse_init_out {
618 uint32_t max_readahead;
620 uint16_t max_background;
621 uint16_t congestion_threshold;
627 #define CUSE_INIT_INFO_MAX 4096 629 struct cuse_init_in {
636 struct cuse_init_out {
648 struct fuse_interrupt_in {
652 struct fuse_bmap_in {
658 struct fuse_bmap_out {
662 struct fuse_ioctl_in {
671 struct fuse_ioctl_iovec {
676 struct fuse_ioctl_out {
683 struct fuse_poll_in {
690 struct fuse_poll_out {
695 struct fuse_notify_poll_wakeup_out {
699 struct fuse_fallocate_in {
707 struct fuse_in_header {
718 struct fuse_out_header {
732 #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) 733 #define FUSE_DIRENT_ALIGN(x) \ 734 (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1)) 735 #define FUSE_DIRENT_SIZE(d) \ 736 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) 738 struct fuse_direntplus {
739 struct fuse_entry_out entry_out;
740 struct fuse_dirent dirent;
743 #define FUSE_NAME_OFFSET_DIRENTPLUS \ 744 offsetof(struct fuse_direntplus, dirent.name) 745 #define FUSE_DIRENTPLUS_SIZE(d) \ 746 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen) 748 struct fuse_notify_inval_inode_out {
754 struct fuse_notify_inval_entry_out {
760 struct fuse_notify_delete_out {
767 struct fuse_notify_store_out {
774 struct fuse_notify_retrieve_out {
775 uint64_t notify_unique;
783 struct fuse_notify_retrieve_in {
793 #define FUSE_DEV_IOC_CLONE _IOR(229, 0, uint32_t) 795 struct fuse_lseek_in {
802 struct fuse_lseek_out {
806 struct fuse_copy_file_range_in {