130 #ifndef _LINUX_FUSE_H 131 #define _LINUX_FUSE_H 134 #include <linux/types.h> 160 #define FUSE_KERNEL_VERSION 7 163 #define FUSE_KERNEL_MINOR_VERSION 29 166 #define FUSE_ROOT_ID 1 190 struct fuse_kstatfs {
203 struct fuse_file_lock {
213 #define FATTR_MODE (1 << 0) 214 #define FATTR_UID (1 << 1) 215 #define FATTR_GID (1 << 2) 216 #define FATTR_SIZE (1 << 3) 217 #define FATTR_ATIME (1 << 4) 218 #define FATTR_MTIME (1 << 5) 219 #define FATTR_FH (1 << 6) 220 #define FATTR_ATIME_NOW (1 << 7) 221 #define FATTR_MTIME_NOW (1 << 8) 222 #define FATTR_LOCKOWNER (1 << 9) 223 #define FATTR_CTIME (1 << 10) 233 #define FOPEN_DIRECT_IO (1 << 0) 234 #define FOPEN_KEEP_CACHE (1 << 1) 235 #define FOPEN_NONSEEKABLE (1 << 2) 236 #define FOPEN_CACHE_DIR (1 << 3) 267 #define FUSE_ASYNC_READ (1 << 0) 268 #define FUSE_POSIX_LOCKS (1 << 1) 269 #define FUSE_FILE_OPS (1 << 2) 270 #define FUSE_ATOMIC_O_TRUNC (1 << 3) 271 #define FUSE_EXPORT_SUPPORT (1 << 4) 272 #define FUSE_BIG_WRITES (1 << 5) 273 #define FUSE_DONT_MASK (1 << 6) 274 #define FUSE_SPLICE_WRITE (1 << 7) 275 #define FUSE_SPLICE_MOVE (1 << 8) 276 #define FUSE_SPLICE_READ (1 << 9) 277 #define FUSE_FLOCK_LOCKS (1 << 10) 278 #define FUSE_HAS_IOCTL_DIR (1 << 11) 279 #define FUSE_AUTO_INVAL_DATA (1 << 12) 280 #define FUSE_DO_READDIRPLUS (1 << 13) 281 #define FUSE_READDIRPLUS_AUTO (1 << 14) 282 #define FUSE_ASYNC_DIO (1 << 15) 283 #define FUSE_WRITEBACK_CACHE (1 << 16) 284 #define FUSE_NO_OPEN_SUPPORT (1 << 17) 285 #define FUSE_PARALLEL_DIROPS (1 << 18) 286 #define FUSE_HANDLE_KILLPRIV (1 << 19) 287 #define FUSE_POSIX_ACL (1 << 20) 288 #define FUSE_ABORT_ERROR (1 << 21) 289 #define FUSE_MAX_PAGES (1 << 22) 290 #define FUSE_CACHE_SYMLINKS (1 << 23) 291 #define FUSE_NO_OPENDIR_SUPPORT (1 << 24) 298 #define CUSE_UNRESTRICTED_IOCTL (1 << 0) 303 #define FUSE_RELEASE_FLUSH (1 << 0) 304 #define FUSE_RELEASE_FLOCK_UNLOCK (1 << 1) 309 #define FUSE_GETATTR_FH (1 << 0) 314 #define FUSE_LK_FLOCK (1 << 0) 322 #define FUSE_WRITE_CACHE (1 << 0) 323 #define FUSE_WRITE_LOCKOWNER (1 << 1) 328 #define FUSE_READ_LOCKOWNER (1 << 1) 341 #define FUSE_IOCTL_COMPAT (1 << 0) 342 #define FUSE_IOCTL_UNRESTRICTED (1 << 1) 343 #define FUSE_IOCTL_RETRY (1 << 2) 344 #define FUSE_IOCTL_32BIT (1 << 3) 345 #define FUSE_IOCTL_DIR (1 << 4) 347 #define FUSE_IOCTL_MAX_IOV 256 354 #define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0) 378 FUSE_REMOVEXATTR = 24,
383 FUSE_RELEASEDIR = 29,
395 FUSE_NOTIFY_REPLY = 41,
396 FUSE_BATCH_FORGET = 42,
398 FUSE_READDIRPLUS = 44,
401 FUSE_COPY_FILE_RANGE = 47,
407 enum fuse_notify_code {
408 FUSE_NOTIFY_POLL = 1,
409 FUSE_NOTIFY_INVAL_INODE = 2,
410 FUSE_NOTIFY_INVAL_ENTRY = 3,
411 FUSE_NOTIFY_STORE = 4,
412 FUSE_NOTIFY_RETRIEVE = 5,
413 FUSE_NOTIFY_DELETE = 6,
414 FUSE_NOTIFY_CODE_MAX,
418 #define FUSE_MIN_READ_BUFFER 8192 420 #define FUSE_COMPAT_ENTRY_OUT_SIZE 120 422 struct fuse_entry_out {
426 uint64_t entry_valid;
428 uint32_t entry_valid_nsec;
429 uint32_t attr_valid_nsec;
430 struct fuse_attr attr;
433 struct fuse_forget_in {
437 struct fuse_forget_one {
442 struct fuse_batch_forget_in {
447 struct fuse_getattr_in {
448 uint32_t getattr_flags;
453 #define FUSE_COMPAT_ATTR_OUT_SIZE 96 455 struct fuse_attr_out {
457 uint32_t attr_valid_nsec;
459 struct fuse_attr attr;
462 #define FUSE_COMPAT_MKNOD_IN_SIZE 8 464 struct fuse_mknod_in {
471 struct fuse_mkdir_in {
476 struct fuse_rename_in {
480 struct fuse_rename2_in {
486 struct fuse_link_in {
490 struct fuse_setattr_in {
509 struct fuse_open_in {
514 struct fuse_create_in {
521 struct fuse_open_out {
527 struct fuse_release_in {
530 uint32_t release_flags;
534 struct fuse_flush_in {
541 struct fuse_read_in {
551 #define FUSE_COMPAT_WRITE_IN_SIZE 24 553 struct fuse_write_in {
557 uint32_t write_flags;
563 struct fuse_write_out {
568 #define FUSE_COMPAT_STATFS_SIZE 48 570 struct fuse_statfs_out {
571 struct fuse_kstatfs st;
574 struct fuse_fsync_in {
576 uint32_t fsync_flags;
580 struct fuse_setxattr_in {
585 struct fuse_getxattr_in {
590 struct fuse_getxattr_out {
598 struct fuse_file_lock lk;
604 struct fuse_file_lock lk;
607 struct fuse_access_in {
612 struct fuse_init_in {
615 uint32_t max_readahead;
619 #define FUSE_COMPAT_INIT_OUT_SIZE 8 620 #define FUSE_COMPAT_22_INIT_OUT_SIZE 24 622 struct fuse_init_out {
625 uint32_t max_readahead;
627 uint16_t max_background;
628 uint16_t congestion_threshold;
636 #define CUSE_INIT_INFO_MAX 4096 638 struct cuse_init_in {
645 struct cuse_init_out {
657 struct fuse_interrupt_in {
661 struct fuse_bmap_in {
667 struct fuse_bmap_out {
671 struct fuse_ioctl_in {
680 struct fuse_ioctl_iovec {
685 struct fuse_ioctl_out {
692 struct fuse_poll_in {
699 struct fuse_poll_out {
704 struct fuse_notify_poll_wakeup_out {
708 struct fuse_fallocate_in {
716 struct fuse_in_header {
727 struct fuse_out_header {
741 #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) 742 #define FUSE_DIRENT_ALIGN(x) \ 743 (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1)) 744 #define FUSE_DIRENT_SIZE(d) \ 745 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) 747 struct fuse_direntplus {
748 struct fuse_entry_out entry_out;
749 struct fuse_dirent dirent;
752 #define FUSE_NAME_OFFSET_DIRENTPLUS \ 753 offsetof(struct fuse_direntplus, dirent.name) 754 #define FUSE_DIRENTPLUS_SIZE(d) \ 755 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen) 757 struct fuse_notify_inval_inode_out {
763 struct fuse_notify_inval_entry_out {
769 struct fuse_notify_delete_out {
776 struct fuse_notify_store_out {
783 struct fuse_notify_retrieve_out {
784 uint64_t notify_unique;
792 struct fuse_notify_retrieve_in {
802 #define FUSE_DEV_IOC_CLONE _IOR(229, 0, uint32_t) 804 struct fuse_lseek_in {
811 struct fuse_lseek_out {
815 struct fuse_copy_file_range_in {