Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _LINUX_FUSE_H |
| 20 | #define _LINUX_FUSE_H |
| 21 | #include <stdint.h> |
| 22 | #define FUSE_KERNEL_VERSION 7 |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame^] | 23 | #define FUSE_KERNEL_MINOR_VERSION 39 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 24 | #define FUSE_ROOT_ID 1 |
| 25 | struct fuse_attr { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 26 | uint64_t ino; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 27 | uint64_t size; |
| 28 | uint64_t blocks; |
| 29 | uint64_t atime; |
| 30 | uint64_t mtime; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | uint64_t ctime; |
| 32 | uint32_t atimensec; |
| 33 | uint32_t mtimensec; |
| 34 | uint32_t ctimensec; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | uint32_t mode; |
| 36 | uint32_t nlink; |
| 37 | uint32_t uid; |
| 38 | uint32_t gid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | uint32_t rdev; |
| 40 | uint32_t blksize; |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 41 | uint32_t flags; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 42 | }; |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame^] | 43 | struct fuse_sx_time { |
| 44 | int64_t tv_sec; |
| 45 | uint32_t tv_nsec; |
| 46 | int32_t __reserved; |
| 47 | }; |
| 48 | struct fuse_statx { |
| 49 | uint32_t mask; |
| 50 | uint32_t blksize; |
| 51 | uint64_t attributes; |
| 52 | uint32_t nlink; |
| 53 | uint32_t uid; |
| 54 | uint32_t gid; |
| 55 | uint16_t mode; |
| 56 | uint16_t __spare0[1]; |
| 57 | uint64_t ino; |
| 58 | uint64_t size; |
| 59 | uint64_t blocks; |
| 60 | uint64_t attributes_mask; |
| 61 | struct fuse_sx_time atime; |
| 62 | struct fuse_sx_time btime; |
| 63 | struct fuse_sx_time ctime; |
| 64 | struct fuse_sx_time mtime; |
| 65 | uint32_t rdev_major; |
| 66 | uint32_t rdev_minor; |
| 67 | uint32_t dev_major; |
| 68 | uint32_t dev_minor; |
| 69 | uint64_t __spare2[14]; |
| 70 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 71 | struct fuse_kstatfs { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 72 | uint64_t blocks; |
| 73 | uint64_t bfree; |
| 74 | uint64_t bavail; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 75 | uint64_t files; |
| 76 | uint64_t ffree; |
| 77 | uint32_t bsize; |
| 78 | uint32_t namelen; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | uint32_t frsize; |
| 80 | uint32_t padding; |
| 81 | uint32_t spare[6]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 82 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 83 | struct fuse_file_lock { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 84 | uint64_t start; |
| 85 | uint64_t end; |
| 86 | uint32_t type; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | uint32_t pid; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 88 | }; |
| 89 | #define FATTR_MODE (1 << 0) |
| 90 | #define FATTR_UID (1 << 1) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 91 | #define FATTR_GID (1 << 2) |
| 92 | #define FATTR_SIZE (1 << 3) |
| 93 | #define FATTR_ATIME (1 << 4) |
| 94 | #define FATTR_MTIME (1 << 5) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 95 | #define FATTR_FH (1 << 6) |
| 96 | #define FATTR_ATIME_NOW (1 << 7) |
| 97 | #define FATTR_MTIME_NOW (1 << 8) |
| 98 | #define FATTR_LOCKOWNER (1 << 9) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 99 | #define FATTR_CTIME (1 << 10) |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 100 | #define FATTR_KILL_SUIDGID (1 << 11) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 101 | #define FOPEN_DIRECT_IO (1 << 0) |
| 102 | #define FOPEN_KEEP_CACHE (1 << 1) |
| 103 | #define FOPEN_NONSEEKABLE (1 << 2) |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 104 | #define FOPEN_CACHE_DIR (1 << 3) |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 105 | #define FOPEN_STREAM (1 << 4) |
Christopher Ferris | a479261 | 2022-01-10 13:51:15 -0800 | [diff] [blame] | 106 | #define FOPEN_NOFLUSH (1 << 5) |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 107 | #define FOPEN_PARALLEL_DIRECT_WRITES (1 << 6) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 108 | #define FUSE_ASYNC_READ (1 << 0) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 109 | #define FUSE_POSIX_LOCKS (1 << 1) |
| 110 | #define FUSE_FILE_OPS (1 << 2) |
| 111 | #define FUSE_ATOMIC_O_TRUNC (1 << 3) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 112 | #define FUSE_EXPORT_SUPPORT (1 << 4) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 113 | #define FUSE_BIG_WRITES (1 << 5) |
| 114 | #define FUSE_DONT_MASK (1 << 6) |
| 115 | #define FUSE_SPLICE_WRITE (1 << 7) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 116 | #define FUSE_SPLICE_MOVE (1 << 8) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 117 | #define FUSE_SPLICE_READ (1 << 9) |
| 118 | #define FUSE_FLOCK_LOCKS (1 << 10) |
| 119 | #define FUSE_HAS_IOCTL_DIR (1 << 11) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 120 | #define FUSE_AUTO_INVAL_DATA (1 << 12) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 121 | #define FUSE_DO_READDIRPLUS (1 << 13) |
| 122 | #define FUSE_READDIRPLUS_AUTO (1 << 14) |
| 123 | #define FUSE_ASYNC_DIO (1 << 15) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 124 | #define FUSE_WRITEBACK_CACHE (1 << 16) |
| 125 | #define FUSE_NO_OPEN_SUPPORT (1 << 17) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 126 | #define FUSE_PARALLEL_DIROPS (1 << 18) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 127 | #define FUSE_HANDLE_KILLPRIV (1 << 19) |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 128 | #define FUSE_POSIX_ACL (1 << 20) |
Christopher Ferris | 9ce2884 | 2018-10-25 12:11:39 -0700 | [diff] [blame] | 129 | #define FUSE_ABORT_ERROR (1 << 21) |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 130 | #define FUSE_MAX_PAGES (1 << 22) |
| 131 | #define FUSE_CACHE_SYMLINKS (1 << 23) |
Christopher Ferris | 24f97eb | 2019-05-20 12:58:13 -0700 | [diff] [blame] | 132 | #define FUSE_NO_OPENDIR_SUPPORT (1 << 24) |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 133 | #define FUSE_EXPLICIT_INVAL_DATA (1 << 25) |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 134 | #define FUSE_MAP_ALIGNMENT (1 << 26) |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 135 | #define FUSE_SUBMOUNTS (1 << 27) |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 136 | #define FUSE_HANDLE_KILLPRIV_V2 (1 << 28) |
Christopher Ferris | fcc3b4f | 2021-07-01 01:30:21 +0000 | [diff] [blame] | 137 | #define FUSE_SETXATTR_EXT (1 << 29) |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 138 | #define FUSE_INIT_EXT (1 << 30) |
| 139 | #define FUSE_INIT_RESERVED (1 << 31) |
| 140 | #define FUSE_SECURITY_CTX (1ULL << 32) |
| 141 | #define FUSE_HAS_INODE_DAX (1ULL << 33) |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 142 | #define FUSE_CREATE_SUPP_GROUP (1ULL << 34) |
Christopher Ferris | 8666d04 | 2023-09-06 14:55:31 -0700 | [diff] [blame] | 143 | #define FUSE_HAS_EXPIRE_ONLY (1ULL << 35) |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame^] | 144 | #define FUSE_DIRECT_IO_RELAX (1ULL << 36) |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 145 | #if FUSE_KERNEL_VERSION > 7 || FUSE_KERNEL_VERSION == 7 && FUSE_KERNEL_MINOR_VERSION >= 36 |
| 146 | #define FUSE_PASSTHROUGH (1ULL << 63) |
| 147 | #else |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 148 | #define FUSE_PASSTHROUGH (1 << 31) |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 149 | #endif |
Christopher Ferris | 6a9755d | 2017-01-13 14:09:31 -0800 | [diff] [blame] | 150 | #define CUSE_UNRESTRICTED_IOCTL (1 << 0) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 151 | #define FUSE_RELEASE_FLUSH (1 << 0) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 152 | #define FUSE_RELEASE_FLOCK_UNLOCK (1 << 1) |
| 153 | #define FUSE_GETATTR_FH (1 << 0) |
| 154 | #define FUSE_LK_FLOCK (1 << 0) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 155 | #define FUSE_WRITE_CACHE (1 << 0) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 156 | #define FUSE_WRITE_LOCKOWNER (1 << 1) |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 157 | #define FUSE_WRITE_KILL_SUIDGID (1 << 2) |
| 158 | #define FUSE_WRITE_KILL_PRIV FUSE_WRITE_KILL_SUIDGID |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 159 | #define FUSE_READ_LOCKOWNER (1 << 1) |
| 160 | #define FUSE_IOCTL_COMPAT (1 << 0) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 161 | #define FUSE_IOCTL_UNRESTRICTED (1 << 1) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 162 | #define FUSE_IOCTL_RETRY (1 << 2) |
| 163 | #define FUSE_IOCTL_32BIT (1 << 3) |
| 164 | #define FUSE_IOCTL_DIR (1 << 4) |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 165 | #define FUSE_IOCTL_COMPAT_X32 (1 << 5) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 166 | #define FUSE_IOCTL_MAX_IOV 256 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 167 | #define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0) |
Christopher Ferris | aeddbcf | 2019-07-08 12:45:46 -0700 | [diff] [blame] | 168 | #define FUSE_FSYNC_FDATASYNC (1 << 0) |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 169 | #define FUSE_ATTR_SUBMOUNT (1 << 0) |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 170 | #define FUSE_ATTR_DAX (1 << 1) |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 171 | #define FUSE_OPEN_KILL_SUIDGID (1 << 0) |
Christopher Ferris | fcc3b4f | 2021-07-01 01:30:21 +0000 | [diff] [blame] | 172 | #define FUSE_SETXATTR_ACL_KILL_SGID (1 << 0) |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 173 | #define FUSE_EXPIRE_ONLY (1 << 0) |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 174 | enum fuse_ext_type { |
| 175 | FUSE_MAX_NR_SECCTX = 31, |
| 176 | FUSE_EXT_GROUPS = 32, |
| 177 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 178 | enum fuse_opcode { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 179 | FUSE_LOOKUP = 1, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 180 | FUSE_FORGET = 2, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 181 | FUSE_GETATTR = 3, |
| 182 | FUSE_SETATTR = 4, |
| 183 | FUSE_READLINK = 5, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 184 | FUSE_SYMLINK = 6, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 185 | FUSE_MKNOD = 8, |
| 186 | FUSE_MKDIR = 9, |
| 187 | FUSE_UNLINK = 10, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 188 | FUSE_RMDIR = 11, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 189 | FUSE_RENAME = 12, |
| 190 | FUSE_LINK = 13, |
| 191 | FUSE_OPEN = 14, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 192 | FUSE_READ = 15, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 193 | FUSE_WRITE = 16, |
| 194 | FUSE_STATFS = 17, |
| 195 | FUSE_RELEASE = 18, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 196 | FUSE_FSYNC = 20, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 197 | FUSE_SETXATTR = 21, |
| 198 | FUSE_GETXATTR = 22, |
| 199 | FUSE_LISTXATTR = 23, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 200 | FUSE_REMOVEXATTR = 24, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 201 | FUSE_FLUSH = 25, |
| 202 | FUSE_INIT = 26, |
| 203 | FUSE_OPENDIR = 27, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 204 | FUSE_READDIR = 28, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 205 | FUSE_RELEASEDIR = 29, |
| 206 | FUSE_FSYNCDIR = 30, |
| 207 | FUSE_GETLK = 31, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 208 | FUSE_SETLK = 32, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 209 | FUSE_SETLKW = 33, |
| 210 | FUSE_ACCESS = 34, |
| 211 | FUSE_CREATE = 35, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 212 | FUSE_INTERRUPT = 36, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 213 | FUSE_BMAP = 37, |
| 214 | FUSE_DESTROY = 38, |
| 215 | FUSE_IOCTL = 39, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 216 | FUSE_POLL = 40, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 217 | FUSE_NOTIFY_REPLY = 41, |
| 218 | FUSE_BATCH_FORGET = 42, |
| 219 | FUSE_FALLOCATE = 43, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 220 | FUSE_READDIRPLUS = 44, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 221 | FUSE_RENAME2 = 45, |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 222 | FUSE_LSEEK = 46, |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 223 | FUSE_COPY_FILE_RANGE = 47, |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 224 | FUSE_SETUPMAPPING = 48, |
| 225 | FUSE_REMOVEMAPPING = 49, |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 226 | FUSE_SYNCFS = 50, |
Christopher Ferris | 6cd53a5 | 2022-12-12 23:39:16 +0000 | [diff] [blame] | 227 | FUSE_TMPFILE = 51, |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame^] | 228 | FUSE_STATX = 52, |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 229 | FUSE_CANONICAL_PATH = 2016, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 230 | CUSE_INIT = 4096, |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 231 | CUSE_INIT_BSWAP_RESERVED = 1048576, |
| 232 | FUSE_INIT_BSWAP_RESERVED = 436207616, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 233 | }; |
| 234 | enum fuse_notify_code { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 235 | FUSE_NOTIFY_POLL = 1, |
| 236 | FUSE_NOTIFY_INVAL_INODE = 2, |
| 237 | FUSE_NOTIFY_INVAL_ENTRY = 3, |
| 238 | FUSE_NOTIFY_STORE = 4, |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 239 | FUSE_NOTIFY_RETRIEVE = 5, |
| 240 | FUSE_NOTIFY_DELETE = 6, |
| 241 | FUSE_NOTIFY_CODE_MAX, |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 242 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 243 | #define FUSE_MIN_READ_BUFFER 8192 |
| 244 | #define FUSE_COMPAT_ENTRY_OUT_SIZE 120 |
| 245 | struct fuse_entry_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 246 | uint64_t nodeid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 247 | uint64_t generation; |
| 248 | uint64_t entry_valid; |
| 249 | uint64_t attr_valid; |
| 250 | uint32_t entry_valid_nsec; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 251 | uint32_t attr_valid_nsec; |
| 252 | struct fuse_attr attr; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 253 | }; |
| 254 | struct fuse_forget_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 255 | uint64_t nlookup; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 256 | }; |
| 257 | struct fuse_forget_one { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 258 | uint64_t nodeid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 259 | uint64_t nlookup; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 260 | }; |
| 261 | struct fuse_batch_forget_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 262 | uint32_t count; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 263 | uint32_t dummy; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 264 | }; |
| 265 | struct fuse_getattr_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 266 | uint32_t getattr_flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 267 | uint32_t dummy; |
| 268 | uint64_t fh; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 269 | }; |
| 270 | #define FUSE_COMPAT_ATTR_OUT_SIZE 96 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 271 | struct fuse_attr_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 272 | uint64_t attr_valid; |
| 273 | uint32_t attr_valid_nsec; |
| 274 | uint32_t dummy; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 275 | struct fuse_attr attr; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 276 | }; |
Christopher Ferris | 67d1e5e | 2023-10-31 13:36:37 -0700 | [diff] [blame^] | 277 | struct fuse_statx_in { |
| 278 | uint32_t getattr_flags; |
| 279 | uint32_t reserved; |
| 280 | uint64_t fh; |
| 281 | uint32_t sx_flags; |
| 282 | uint32_t sx_mask; |
| 283 | }; |
| 284 | struct fuse_statx_out { |
| 285 | uint64_t attr_valid; |
| 286 | uint32_t attr_valid_nsec; |
| 287 | uint32_t flags; |
| 288 | uint64_t spare[2]; |
| 289 | struct fuse_statx stat; |
| 290 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 291 | #define FUSE_COMPAT_MKNOD_IN_SIZE 8 |
| 292 | struct fuse_mknod_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 293 | uint32_t mode; |
| 294 | uint32_t rdev; |
| 295 | uint32_t umask; |
| 296 | uint32_t padding; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 297 | }; |
| 298 | struct fuse_mkdir_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 299 | uint32_t mode; |
| 300 | uint32_t umask; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 301 | }; |
| 302 | struct fuse_rename_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 303 | uint64_t newdir; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 304 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 305 | struct fuse_rename2_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 306 | uint64_t newdir; |
| 307 | uint32_t flags; |
| 308 | uint32_t padding; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 309 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 310 | struct fuse_link_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 311 | uint64_t oldnodeid; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 312 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 313 | struct fuse_setattr_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 314 | uint32_t valid; |
| 315 | uint32_t padding; |
| 316 | uint64_t fh; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 317 | uint64_t size; |
| 318 | uint64_t lock_owner; |
| 319 | uint64_t atime; |
| 320 | uint64_t mtime; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 321 | uint64_t ctime; |
| 322 | uint32_t atimensec; |
| 323 | uint32_t mtimensec; |
| 324 | uint32_t ctimensec; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 325 | uint32_t mode; |
| 326 | uint32_t unused4; |
| 327 | uint32_t uid; |
| 328 | uint32_t gid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 329 | uint32_t unused5; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 330 | }; |
| 331 | struct fuse_open_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 332 | uint32_t flags; |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 333 | uint32_t open_flags; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 334 | }; |
| 335 | struct fuse_create_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 336 | uint32_t flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 337 | uint32_t mode; |
| 338 | uint32_t umask; |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 339 | uint32_t open_flags; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 340 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 341 | struct fuse_open_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 342 | uint64_t fh; |
| 343 | uint32_t open_flags; |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 344 | uint32_t passthrough_fh; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 345 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 346 | struct fuse_release_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 347 | uint64_t fh; |
| 348 | uint32_t flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 349 | uint32_t release_flags; |
| 350 | uint64_t lock_owner; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 351 | }; |
| 352 | struct fuse_flush_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 353 | uint64_t fh; |
| 354 | uint32_t unused; |
| 355 | uint32_t padding; |
| 356 | uint64_t lock_owner; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 357 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 358 | struct fuse_read_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 359 | uint64_t fh; |
| 360 | uint64_t offset; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 361 | uint32_t size; |
| 362 | uint32_t read_flags; |
| 363 | uint64_t lock_owner; |
| 364 | uint32_t flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 365 | uint32_t padding; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 366 | }; |
| 367 | #define FUSE_COMPAT_WRITE_IN_SIZE 24 |
| 368 | struct fuse_write_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 369 | uint64_t fh; |
| 370 | uint64_t offset; |
| 371 | uint32_t size; |
| 372 | uint32_t write_flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 373 | uint64_t lock_owner; |
| 374 | uint32_t flags; |
| 375 | uint32_t padding; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 376 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 377 | struct fuse_write_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 378 | uint32_t size; |
| 379 | uint32_t padding; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 380 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 381 | #define FUSE_COMPAT_STATFS_SIZE 48 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 382 | struct fuse_statfs_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 383 | struct fuse_kstatfs st; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 384 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 385 | struct fuse_fsync_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 386 | uint64_t fh; |
| 387 | uint32_t fsync_flags; |
| 388 | uint32_t padding; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 389 | }; |
Christopher Ferris | fcc3b4f | 2021-07-01 01:30:21 +0000 | [diff] [blame] | 390 | #define FUSE_COMPAT_SETXATTR_IN_SIZE 8 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 391 | struct fuse_setxattr_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 392 | uint32_t size; |
| 393 | uint32_t flags; |
Christopher Ferris | fcc3b4f | 2021-07-01 01:30:21 +0000 | [diff] [blame] | 394 | uint32_t setxattr_flags; |
| 395 | uint32_t padding; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 396 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 397 | struct fuse_getxattr_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 398 | uint32_t size; |
| 399 | uint32_t padding; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 400 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 401 | struct fuse_getxattr_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 402 | uint32_t size; |
| 403 | uint32_t padding; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 404 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 405 | struct fuse_lk_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 406 | uint64_t fh; |
| 407 | uint64_t owner; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 408 | struct fuse_file_lock lk; |
| 409 | uint32_t lk_flags; |
| 410 | uint32_t padding; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 411 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 412 | struct fuse_lk_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 413 | struct fuse_file_lock lk; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 414 | }; |
| 415 | struct fuse_access_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 416 | uint32_t mask; |
| 417 | uint32_t padding; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 418 | }; |
| 419 | struct fuse_init_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 420 | uint32_t major; |
| 421 | uint32_t minor; |
| 422 | uint32_t max_readahead; |
| 423 | uint32_t flags; |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 424 | uint32_t flags2; |
| 425 | uint32_t unused[11]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 426 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 427 | #define FUSE_COMPAT_INIT_OUT_SIZE 8 |
| 428 | #define FUSE_COMPAT_22_INIT_OUT_SIZE 24 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 429 | struct fuse_init_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 430 | uint32_t major; |
| 431 | uint32_t minor; |
| 432 | uint32_t max_readahead; |
| 433 | uint32_t flags; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 434 | uint16_t max_background; |
| 435 | uint16_t congestion_threshold; |
| 436 | uint32_t max_write; |
| 437 | uint32_t time_gran; |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 438 | uint16_t max_pages; |
Christopher Ferris | 9584fa4 | 2019-12-09 15:36:13 -0800 | [diff] [blame] | 439 | uint16_t map_alignment; |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 440 | uint32_t flags2; |
| 441 | uint32_t unused[7]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 442 | }; |
| 443 | #define CUSE_INIT_INFO_MAX 4096 |
| 444 | struct cuse_init_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 445 | uint32_t major; |
| 446 | uint32_t minor; |
| 447 | uint32_t unused; |
| 448 | uint32_t flags; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 449 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 450 | struct cuse_init_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 451 | uint32_t major; |
| 452 | uint32_t minor; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 453 | uint32_t unused; |
| 454 | uint32_t flags; |
| 455 | uint32_t max_read; |
| 456 | uint32_t max_write; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 457 | uint32_t dev_major; |
| 458 | uint32_t dev_minor; |
| 459 | uint32_t spare[10]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 460 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 461 | struct fuse_interrupt_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 462 | uint64_t unique; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 463 | }; |
| 464 | struct fuse_bmap_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 465 | uint64_t block; |
| 466 | uint32_t blocksize; |
| 467 | uint32_t padding; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 468 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 469 | struct fuse_bmap_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 470 | uint64_t block; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 471 | }; |
| 472 | struct fuse_ioctl_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 473 | uint64_t fh; |
| 474 | uint32_t flags; |
| 475 | uint32_t cmd; |
| 476 | uint64_t arg; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 477 | uint32_t in_size; |
| 478 | uint32_t out_size; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 479 | }; |
| 480 | struct fuse_ioctl_iovec { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 481 | uint64_t base; |
| 482 | uint64_t len; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 483 | }; |
| 484 | struct fuse_ioctl_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 485 | int32_t result; |
| 486 | uint32_t flags; |
| 487 | uint32_t in_iovs; |
| 488 | uint32_t out_iovs; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 489 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 490 | struct fuse_poll_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 491 | uint64_t fh; |
| 492 | uint64_t kh; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 493 | uint32_t flags; |
| 494 | uint32_t events; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 495 | }; |
| 496 | struct fuse_poll_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 497 | uint32_t revents; |
| 498 | uint32_t padding; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 499 | }; |
| 500 | struct fuse_notify_poll_wakeup_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 501 | uint64_t kh; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 502 | }; |
| 503 | struct fuse_fallocate_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 504 | uint64_t fh; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 505 | uint64_t offset; |
| 506 | uint64_t length; |
| 507 | uint32_t mode; |
| 508 | uint32_t padding; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 509 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 510 | struct fuse_in_header { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 511 | uint32_t len; |
| 512 | uint32_t opcode; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 513 | uint64_t unique; |
| 514 | uint64_t nodeid; |
| 515 | uint32_t uid; |
| 516 | uint32_t gid; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 517 | uint32_t pid; |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 518 | uint16_t total_extlen; |
| 519 | uint16_t padding; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 520 | }; |
| 521 | struct fuse_out_header { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 522 | uint32_t len; |
| 523 | int32_t error; |
| 524 | uint64_t unique; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 525 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 526 | struct fuse_dirent { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 527 | uint64_t ino; |
| 528 | uint64_t off; |
| 529 | uint32_t namelen; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 530 | uint32_t type; |
| 531 | char name[]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 532 | }; |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 533 | #define FUSE_REC_ALIGN(x) (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1)) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 534 | #define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name) |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 535 | #define FUSE_DIRENT_ALIGN(x) FUSE_REC_ALIGN(x) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 536 | #define FUSE_DIRENT_SIZE(d) FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 537 | struct fuse_direntplus { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 538 | struct fuse_entry_out entry_out; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 539 | struct fuse_dirent dirent; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 540 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 541 | #define FUSE_NAME_OFFSET_DIRENTPLUS offsetof(struct fuse_direntplus, dirent.name) |
| 542 | #define FUSE_DIRENTPLUS_SIZE(d) FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen) |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 543 | struct fuse_notify_inval_inode_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 544 | uint64_t ino; |
| 545 | int64_t off; |
| 546 | int64_t len; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 547 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 548 | struct fuse_notify_inval_entry_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 549 | uint64_t parent; |
| 550 | uint32_t namelen; |
Christopher Ferris | 8b7fdc9 | 2023-02-21 13:36:32 -0800 | [diff] [blame] | 551 | uint32_t flags; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 552 | }; |
| 553 | struct fuse_notify_delete_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 554 | uint64_t parent; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 555 | uint64_t child; |
| 556 | uint32_t namelen; |
| 557 | uint32_t padding; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 558 | }; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 559 | struct fuse_notify_store_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 560 | uint64_t nodeid; |
| 561 | uint64_t offset; |
| 562 | uint32_t size; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 563 | uint32_t padding; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 564 | }; |
| 565 | struct fuse_notify_retrieve_out { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 566 | uint64_t notify_unique; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 567 | uint64_t nodeid; |
| 568 | uint64_t offset; |
| 569 | uint32_t size; |
| 570 | uint32_t padding; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 571 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 572 | struct fuse_notify_retrieve_in { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 573 | uint64_t dummy1; |
| 574 | uint64_t offset; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 575 | uint32_t size; |
| 576 | uint32_t dummy2; |
| 577 | uint64_t dummy3; |
| 578 | uint64_t dummy4; |
Christopher Ferris | ba8d4f4 | 2014-09-03 19:56:49 -0700 | [diff] [blame] | 579 | }; |
Christopher Ferris | 05667cd | 2021-02-16 16:01:34 -0800 | [diff] [blame] | 580 | #define FUSE_DEV_IOC_MAGIC 229 |
| 581 | #define FUSE_DEV_IOC_CLONE _IOR(FUSE_DEV_IOC_MAGIC, 0, uint32_t) |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 582 | #define FUSE_DEV_IOC_PASSTHROUGH_OPEN _IOW(FUSE_DEV_IOC_MAGIC, 126, uint32_t) |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 583 | struct fuse_lseek_in { |
| 584 | uint64_t fh; |
| 585 | uint64_t offset; |
| 586 | uint32_t whence; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 587 | uint32_t padding; |
| 588 | }; |
| 589 | struct fuse_lseek_out { |
| 590 | uint64_t offset; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 591 | }; |
Christopher Ferris | 86a4837 | 2019-01-10 14:14:59 -0800 | [diff] [blame] | 592 | struct fuse_copy_file_range_in { |
| 593 | uint64_t fh_in; |
| 594 | uint64_t off_in; |
| 595 | uint64_t nodeid_out; |
| 596 | uint64_t fh_out; |
| 597 | uint64_t off_out; |
| 598 | uint64_t len; |
| 599 | uint64_t flags; |
| 600 | }; |
Christopher Ferris | 32ff3f8 | 2020-12-14 13:10:04 -0800 | [diff] [blame] | 601 | #define FUSE_SETUPMAPPING_FLAG_WRITE (1ull << 0) |
| 602 | #define FUSE_SETUPMAPPING_FLAG_READ (1ull << 1) |
| 603 | struct fuse_setupmapping_in { |
| 604 | uint64_t fh; |
| 605 | uint64_t foffset; |
| 606 | uint64_t len; |
| 607 | uint64_t flags; |
| 608 | uint64_t moffset; |
| 609 | }; |
| 610 | struct fuse_removemapping_in { |
| 611 | uint32_t count; |
| 612 | }; |
| 613 | struct fuse_removemapping_one { |
| 614 | uint64_t moffset; |
| 615 | uint64_t len; |
| 616 | }; |
| 617 | #define FUSE_REMOVEMAPPING_MAX_ENTRY (PAGE_SIZE / sizeof(struct fuse_removemapping_one)) |
Christopher Ferris | 3a39c0b | 2021-09-02 00:03:38 +0000 | [diff] [blame] | 618 | struct fuse_syncfs_in { |
| 619 | uint64_t padding; |
| 620 | }; |
Christopher Ferris | 1ed5534 | 2022-03-22 16:06:25 -0700 | [diff] [blame] | 621 | struct fuse_secctx { |
| 622 | uint32_t size; |
| 623 | uint32_t padding; |
| 624 | }; |
| 625 | struct fuse_secctx_header { |
| 626 | uint32_t size; |
| 627 | uint32_t nr_secctx; |
| 628 | }; |
Christopher Ferris | b7cef6d | 2023-05-09 19:04:15 +0000 | [diff] [blame] | 629 | struct fuse_ext_header { |
| 630 | uint32_t size; |
| 631 | uint32_t type; |
| 632 | }; |
| 633 | struct fuse_supp_groups { |
| 634 | uint32_t nr_groups; |
| 635 | uint32_t groups[]; |
| 636 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 637 | #endif |