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