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