205 #ifndef _LINUX_FUSE_H 
  206 #define _LINUX_FUSE_H 
  209 #include <linux/types.h> 
  235 #define FUSE_KERNEL_VERSION 7 
  238 #define FUSE_KERNEL_MINOR_VERSION 38 
  241 #define FUSE_ROOT_ID 1 
  265 struct fuse_kstatfs {
 
  278 struct fuse_file_lock {
 
  288 #define FATTR_MODE      (1 << 0) 
  289 #define FATTR_UID       (1 << 1) 
  290 #define FATTR_GID       (1 << 2) 
  291 #define FATTR_SIZE      (1 << 3) 
  292 #define FATTR_ATIME     (1 << 4) 
  293 #define FATTR_MTIME     (1 << 5) 
  294 #define FATTR_FH        (1 << 6) 
  295 #define FATTR_ATIME_NOW (1 << 7) 
  296 #define FATTR_MTIME_NOW (1 << 8) 
  297 #define FATTR_LOCKOWNER (1 << 9) 
  298 #define FATTR_CTIME     (1 << 10) 
  299 #define FATTR_KILL_SUIDGID      (1 << 11) 
  311 #define FOPEN_DIRECT_IO         (1 << 0) 
  312 #define FOPEN_KEEP_CACHE        (1 << 1) 
  313 #define FOPEN_NONSEEKABLE       (1 << 2) 
  314 #define FOPEN_CACHE_DIR         (1 << 3) 
  315 #define FOPEN_STREAM            (1 << 4) 
  316 #define FOPEN_NOFLUSH           (1 << 5) 
  363 #define FUSE_ASYNC_READ         (1 << 0) 
  364 #define FUSE_POSIX_LOCKS        (1 << 1) 
  365 #define FUSE_FILE_OPS           (1 << 2) 
  366 #define FUSE_ATOMIC_O_TRUNC     (1 << 3) 
  367 #define FUSE_EXPORT_SUPPORT     (1 << 4) 
  368 #define FUSE_BIG_WRITES         (1 << 5) 
  369 #define FUSE_DONT_MASK          (1 << 6) 
  370 #define FUSE_SPLICE_WRITE       (1 << 7) 
  371 #define FUSE_SPLICE_MOVE        (1 << 8) 
  372 #define FUSE_SPLICE_READ        (1 << 9) 
  373 #define FUSE_FLOCK_LOCKS        (1 << 10) 
  374 #define FUSE_HAS_IOCTL_DIR      (1 << 11) 
  375 #define FUSE_AUTO_INVAL_DATA    (1 << 12) 
  376 #define FUSE_DO_READDIRPLUS     (1 << 13) 
  377 #define FUSE_READDIRPLUS_AUTO   (1 << 14) 
  378 #define FUSE_ASYNC_DIO          (1 << 15) 
  379 #define FUSE_WRITEBACK_CACHE    (1 << 16) 
  380 #define FUSE_NO_OPEN_SUPPORT    (1 << 17) 
  381 #define FUSE_PARALLEL_DIROPS    (1 << 18) 
  382 #define FUSE_HANDLE_KILLPRIV    (1 << 19) 
  383 #define FUSE_POSIX_ACL          (1 << 20) 
  384 #define FUSE_ABORT_ERROR        (1 << 21) 
  385 #define FUSE_MAX_PAGES          (1 << 22) 
  386 #define FUSE_CACHE_SYMLINKS     (1 << 23) 
  387 #define FUSE_NO_OPENDIR_SUPPORT (1 << 24) 
  388 #define FUSE_EXPLICIT_INVAL_DATA (1 << 25) 
  389 #define FUSE_MAP_ALIGNMENT      (1 << 26) 
  390 #define FUSE_SUBMOUNTS          (1 << 27) 
  391 #define FUSE_HANDLE_KILLPRIV_V2 (1 << 28) 
  392 #define FUSE_SETXATTR_EXT       (1 << 29) 
  393 #define FUSE_INIT_EXT           (1 << 30) 
  394 #define FUSE_INIT_RESERVED      (1 << 31) 
  396 #define FUSE_SECURITY_CTX       (1ULL << 32) 
  397 #define FUSE_HAS_INODE_DAX      (1ULL << 33) 
  404 #define CUSE_UNRESTRICTED_IOCTL (1 << 0) 
  409 #define FUSE_RELEASE_FLUSH      (1 << 0) 
  410 #define FUSE_RELEASE_FLOCK_UNLOCK       (1 << 1) 
  415 #define FUSE_GETATTR_FH         (1 << 0) 
  420 #define FUSE_LK_FLOCK           (1 << 0) 
  429 #define FUSE_WRITE_CACHE        (1 << 0) 
  430 #define FUSE_WRITE_LOCKOWNER    (1 << 1) 
  431 #define FUSE_WRITE_KILL_SUIDGID (1 << 2) 
  434 #define FUSE_WRITE_KILL_PRIV    FUSE_WRITE_KILL_SUIDGID 
  439 #define FUSE_READ_LOCKOWNER     (1 << 1) 
  453 #define FUSE_IOCTL_COMPAT       (1 << 0) 
  454 #define FUSE_IOCTL_UNRESTRICTED (1 << 1) 
  455 #define FUSE_IOCTL_RETRY        (1 << 2) 
  456 #define FUSE_IOCTL_32BIT        (1 << 3) 
  457 #define FUSE_IOCTL_DIR          (1 << 4) 
  458 #define FUSE_IOCTL_COMPAT_X32   (1 << 5) 
  460 #define FUSE_IOCTL_MAX_IOV      256 
  467 #define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0) 
  474 #define FUSE_FSYNC_FDATASYNC    (1 << 0) 
  482 #define FUSE_ATTR_SUBMOUNT      (1 << 0) 
  483 #define FUSE_ATTR_DAX           (1 << 1) 
  489 #define FUSE_OPEN_KILL_SUIDGID  (1 << 0) 
  495 #define FUSE_SETXATTR_ACL_KILL_SGID     (1 << 0) 
  501 #define FUSE_EXPIRE_ONLY                (1 << 0) 
  525         FUSE_REMOVEXATTR        = 24,
 
  530         FUSE_RELEASEDIR         = 29,
 
  542         FUSE_NOTIFY_REPLY       = 41,
 
  543         FUSE_BATCH_FORGET       = 42,
 
  545         FUSE_READDIRPLUS        = 44,
 
  548         FUSE_COPY_FILE_RANGE    = 47,
 
  549         FUSE_SETUPMAPPING       = 48,
 
  550         FUSE_REMOVEMAPPING      = 49,
 
  558         CUSE_INIT_BSWAP_RESERVED        = 1048576,      
 
  559         FUSE_INIT_BSWAP_RESERVED        = 436207616,    
 
  562 enum fuse_notify_code {
 
  563         FUSE_NOTIFY_POLL   = 1,
 
  564         FUSE_NOTIFY_INVAL_INODE = 2,
 
  565         FUSE_NOTIFY_INVAL_ENTRY = 3,
 
  566         FUSE_NOTIFY_STORE = 4,
 
  567         FUSE_NOTIFY_RETRIEVE = 5,
 
  568         FUSE_NOTIFY_DELETE = 6,
 
  569         FUSE_NOTIFY_CODE_MAX,
 
  573 #define FUSE_MIN_READ_BUFFER 8192 
  575 #define FUSE_COMPAT_ENTRY_OUT_SIZE 120 
  577 struct fuse_entry_out {
 
  581         uint64_t        entry_valid;    
 
  583         uint32_t        entry_valid_nsec;
 
  584         uint32_t        attr_valid_nsec;
 
  585         struct fuse_attr attr;
 
  588 struct fuse_forget_in {
 
  592 struct fuse_forget_one {
 
  597 struct fuse_batch_forget_in {
 
  602 struct fuse_getattr_in {
 
  603         uint32_t        getattr_flags;
 
  608 #define FUSE_COMPAT_ATTR_OUT_SIZE 96 
  610 struct fuse_attr_out {
 
  612         uint32_t        attr_valid_nsec;
 
  614         struct fuse_attr attr;
 
  617 #define FUSE_COMPAT_MKNOD_IN_SIZE 8 
  619 struct fuse_mknod_in {
 
  626 struct fuse_mkdir_in {
 
  631 struct fuse_rename_in {
 
  635 struct fuse_rename2_in {
 
  641 struct fuse_link_in {
 
  645 struct fuse_setattr_in {
 
  664 struct fuse_open_in {
 
  669 struct fuse_create_in {
 
  676 struct fuse_open_out {
 
  682 struct fuse_release_in {
 
  685         uint32_t        release_flags;
 
  689 struct fuse_flush_in {
 
  696 struct fuse_read_in {
 
  706 #define FUSE_COMPAT_WRITE_IN_SIZE 24 
  708 struct fuse_write_in {
 
  712         uint32_t        write_flags;
 
  718 struct fuse_write_out {
 
  723 #define FUSE_COMPAT_STATFS_SIZE 48 
  725 struct fuse_statfs_out {
 
  726         struct fuse_kstatfs st;
 
  729 struct fuse_fsync_in {
 
  731         uint32_t        fsync_flags;
 
  735 #define FUSE_COMPAT_SETXATTR_IN_SIZE 8 
  737 struct fuse_setxattr_in {
 
  740         uint32_t        setxattr_flags;
 
  744 struct fuse_getxattr_in {
 
  749 struct fuse_getxattr_out {
 
  757         struct fuse_file_lock lk;
 
  763         struct fuse_file_lock lk;
 
  766 struct fuse_access_in {
 
  771 struct fuse_init_in {
 
  774         uint32_t        max_readahead;
 
  780 #define FUSE_COMPAT_INIT_OUT_SIZE 8 
  781 #define FUSE_COMPAT_22_INIT_OUT_SIZE 24 
  783 struct fuse_init_out {
 
  786         uint32_t        max_readahead;
 
  788         uint16_t        max_background;
 
  789         uint16_t        congestion_threshold;
 
  793         uint16_t        map_alignment;
 
  798 #define CUSE_INIT_INFO_MAX 4096 
  800 struct cuse_init_in {
 
  807 struct cuse_init_out {
 
  819 struct fuse_interrupt_in {
 
  823 struct fuse_bmap_in {
 
  829 struct fuse_bmap_out {
 
  833 struct fuse_ioctl_in {
 
  842 struct fuse_ioctl_iovec {
 
  847 struct fuse_ioctl_out {
 
  854 struct fuse_poll_in {
 
  861 struct fuse_poll_out {
 
  866 struct fuse_notify_poll_wakeup_out {
 
  870 struct fuse_fallocate_in {
 
  878 struct fuse_in_header {
 
  889 struct fuse_out_header {
 
  904 #define FUSE_REC_ALIGN(x) \ 
  905         (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1)) 
  907 #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) 
  908 #define FUSE_DIRENT_ALIGN(x) FUSE_REC_ALIGN(x) 
  909 #define FUSE_DIRENT_SIZE(d) \ 
  910         FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) 
  912 struct fuse_direntplus {
 
  913         struct fuse_entry_out entry_out;
 
  914         struct fuse_dirent dirent;
 
  917 #define FUSE_NAME_OFFSET_DIRENTPLUS \ 
  918         offsetof(struct fuse_direntplus, dirent.name) 
  919 #define FUSE_DIRENTPLUS_SIZE(d) \ 
  920         FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen) 
  922 struct fuse_notify_inval_inode_out {
 
  928 struct fuse_notify_inval_entry_out {
 
  934 struct fuse_notify_delete_out {
 
  941 struct fuse_notify_store_out {
 
  948 struct fuse_notify_retrieve_out {
 
  949         uint64_t        notify_unique;
 
  957 struct fuse_notify_retrieve_in {
 
  967 #define FUSE_DEV_IOC_MAGIC              229 
  968 #define FUSE_DEV_IOC_CLONE              _IOR(FUSE_DEV_IOC_MAGIC, 0, uint32_t) 
  970 struct fuse_lseek_in {
 
  977 struct fuse_lseek_out {
 
  981 struct fuse_copy_file_range_in {
 
  991 #define FUSE_SETUPMAPPING_FLAG_WRITE (1ull << 0) 
  992 #define FUSE_SETUPMAPPING_FLAG_READ (1ull << 1) 
  993 struct fuse_setupmapping_in {
 
 1006 struct fuse_removemapping_in {
 
 1011 struct fuse_removemapping_one {
 
 1018 #define FUSE_REMOVEMAPPING_MAX_ENTRY   \ 
 1019                 (PAGE_SIZE / sizeof(struct fuse_removemapping_one)) 
 1021 struct fuse_syncfs_in {
 
 1031 struct fuse_secctx {
 
 1042 struct fuse_secctx_header {