blob: 4a76ae3175f8169fb4f4486b820d583627d70a18 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 Ferris24f97eb2019-05-20 12:58:13 -070023#define FUSE_KERNEL_MINOR_VERSION 29
Ben Cheng655a7c02013-10-16 16:09:24 -070024#define FUSE_ROOT_ID 1
25struct fuse_attr {
Tao Baod7db5942015-01-28 10:07:51 -080026 uint64_t ino;
Tao Baod7db5942015-01-28 10:07:51 -080027 uint64_t size;
28 uint64_t blocks;
29 uint64_t atime;
30 uint64_t mtime;
Tao Baod7db5942015-01-28 10:07:51 -080031 uint64_t ctime;
32 uint32_t atimensec;
33 uint32_t mtimensec;
34 uint32_t ctimensec;
Tao Baod7db5942015-01-28 10:07:51 -080035 uint32_t mode;
36 uint32_t nlink;
37 uint32_t uid;
38 uint32_t gid;
Tao Baod7db5942015-01-28 10:07:51 -080039 uint32_t rdev;
40 uint32_t blksize;
41 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -070042};
Ben Cheng655a7c02013-10-16 16:09:24 -070043struct fuse_kstatfs {
Tao Baod7db5942015-01-28 10:07:51 -080044 uint64_t blocks;
45 uint64_t bfree;
46 uint64_t bavail;
Tao Baod7db5942015-01-28 10:07:51 -080047 uint64_t files;
48 uint64_t ffree;
49 uint32_t bsize;
50 uint32_t namelen;
Tao Baod7db5942015-01-28 10:07:51 -080051 uint32_t frsize;
52 uint32_t padding;
53 uint32_t spare[6];
Ben Cheng655a7c02013-10-16 16:09:24 -070054};
Ben Cheng655a7c02013-10-16 16:09:24 -070055struct fuse_file_lock {
Tao Baod7db5942015-01-28 10:07:51 -080056 uint64_t start;
57 uint64_t end;
58 uint32_t type;
Tao Baod7db5942015-01-28 10:07:51 -080059 uint32_t pid;
Ben Cheng655a7c02013-10-16 16:09:24 -070060};
61#define FATTR_MODE (1 << 0)
62#define FATTR_UID (1 << 1)
Ben Cheng655a7c02013-10-16 16:09:24 -070063#define FATTR_GID (1 << 2)
64#define FATTR_SIZE (1 << 3)
65#define FATTR_ATIME (1 << 4)
66#define FATTR_MTIME (1 << 5)
Ben Cheng655a7c02013-10-16 16:09:24 -070067#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 Ferrisba8d4f42014-09-03 19:56:49 -070071#define FATTR_CTIME (1 << 10)
Ben Cheng655a7c02013-10-16 16:09:24 -070072#define FOPEN_DIRECT_IO (1 << 0)
73#define FOPEN_KEEP_CACHE (1 << 1)
74#define FOPEN_NONSEEKABLE (1 << 2)
Christopher Ferris86a48372019-01-10 14:14:59 -080075#define FOPEN_CACHE_DIR (1 << 3)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070076#define FUSE_ASYNC_READ (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -070077#define FUSE_POSIX_LOCKS (1 << 1)
78#define FUSE_FILE_OPS (1 << 2)
79#define FUSE_ATOMIC_O_TRUNC (1 << 3)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070080#define FUSE_EXPORT_SUPPORT (1 << 4)
Ben Cheng655a7c02013-10-16 16:09:24 -070081#define FUSE_BIG_WRITES (1 << 5)
82#define FUSE_DONT_MASK (1 << 6)
83#define FUSE_SPLICE_WRITE (1 << 7)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070084#define FUSE_SPLICE_MOVE (1 << 8)
Ben Cheng655a7c02013-10-16 16:09:24 -070085#define FUSE_SPLICE_READ (1 << 9)
86#define FUSE_FLOCK_LOCKS (1 << 10)
87#define FUSE_HAS_IOCTL_DIR (1 << 11)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070088#define FUSE_AUTO_INVAL_DATA (1 << 12)
Ben Cheng655a7c02013-10-16 16:09:24 -070089#define FUSE_DO_READDIRPLUS (1 << 13)
90#define FUSE_READDIRPLUS_AUTO (1 << 14)
91#define FUSE_ASYNC_DIO (1 << 15)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070092#define FUSE_WRITEBACK_CACHE (1 << 16)
93#define FUSE_NO_OPEN_SUPPORT (1 << 17)
Christopher Ferris106b3a82016-08-24 12:15:38 -070094#define FUSE_PARALLEL_DIROPS (1 << 18)
Christopher Ferris6a9755d2017-01-13 14:09:31 -080095#define FUSE_HANDLE_KILLPRIV (1 << 19)
Christopher Ferris6a9755d2017-01-13 14:09:31 -080096#define FUSE_POSIX_ACL (1 << 20)
Christopher Ferris9ce28842018-10-25 12:11:39 -070097#define FUSE_ABORT_ERROR (1 << 21)
Christopher Ferris86a48372019-01-10 14:14:59 -080098#define FUSE_MAX_PAGES (1 << 22)
99#define FUSE_CACHE_SYMLINKS (1 << 23)
Christopher Ferris24f97eb2019-05-20 12:58:13 -0700100#define FUSE_NO_OPENDIR_SUPPORT (1 << 24)
Christopher Ferris6a9755d2017-01-13 14:09:31 -0800101#define CUSE_UNRESTRICTED_IOCTL (1 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700102#define FUSE_RELEASE_FLUSH (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700103#define FUSE_RELEASE_FLOCK_UNLOCK (1 << 1)
104#define FUSE_GETATTR_FH (1 << 0)
105#define FUSE_LK_FLOCK (1 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700106#define FUSE_WRITE_CACHE (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700107#define FUSE_WRITE_LOCKOWNER (1 << 1)
108#define FUSE_READ_LOCKOWNER (1 << 1)
109#define FUSE_IOCTL_COMPAT (1 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700110#define FUSE_IOCTL_UNRESTRICTED (1 << 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700111#define FUSE_IOCTL_RETRY (1 << 2)
112#define FUSE_IOCTL_32BIT (1 << 3)
113#define FUSE_IOCTL_DIR (1 << 4)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700114#define FUSE_IOCTL_MAX_IOV 256
Ben Cheng655a7c02013-10-16 16:09:24 -0700115#define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)
116enum fuse_opcode {
Tao Baod7db5942015-01-28 10:07:51 -0800117 FUSE_LOOKUP = 1,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700118 FUSE_FORGET = 2,
Tao Baod7db5942015-01-28 10:07:51 -0800119 FUSE_GETATTR = 3,
120 FUSE_SETATTR = 4,
121 FUSE_READLINK = 5,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700122 FUSE_SYMLINK = 6,
Tao Baod7db5942015-01-28 10:07:51 -0800123 FUSE_MKNOD = 8,
124 FUSE_MKDIR = 9,
125 FUSE_UNLINK = 10,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700126 FUSE_RMDIR = 11,
Tao Baod7db5942015-01-28 10:07:51 -0800127 FUSE_RENAME = 12,
128 FUSE_LINK = 13,
129 FUSE_OPEN = 14,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700130 FUSE_READ = 15,
Tao Baod7db5942015-01-28 10:07:51 -0800131 FUSE_WRITE = 16,
132 FUSE_STATFS = 17,
133 FUSE_RELEASE = 18,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700134 FUSE_FSYNC = 20,
Tao Baod7db5942015-01-28 10:07:51 -0800135 FUSE_SETXATTR = 21,
136 FUSE_GETXATTR = 22,
137 FUSE_LISTXATTR = 23,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700138 FUSE_REMOVEXATTR = 24,
Tao Baod7db5942015-01-28 10:07:51 -0800139 FUSE_FLUSH = 25,
140 FUSE_INIT = 26,
141 FUSE_OPENDIR = 27,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700142 FUSE_READDIR = 28,
Tao Baod7db5942015-01-28 10:07:51 -0800143 FUSE_RELEASEDIR = 29,
144 FUSE_FSYNCDIR = 30,
145 FUSE_GETLK = 31,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700146 FUSE_SETLK = 32,
Tao Baod7db5942015-01-28 10:07:51 -0800147 FUSE_SETLKW = 33,
148 FUSE_ACCESS = 34,
149 FUSE_CREATE = 35,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700150 FUSE_INTERRUPT = 36,
Tao Baod7db5942015-01-28 10:07:51 -0800151 FUSE_BMAP = 37,
152 FUSE_DESTROY = 38,
153 FUSE_IOCTL = 39,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700154 FUSE_POLL = 40,
Tao Baod7db5942015-01-28 10:07:51 -0800155 FUSE_NOTIFY_REPLY = 41,
156 FUSE_BATCH_FORGET = 42,
157 FUSE_FALLOCATE = 43,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700158 FUSE_READDIRPLUS = 44,
Tao Baod7db5942015-01-28 10:07:51 -0800159 FUSE_RENAME2 = 45,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700160 FUSE_LSEEK = 46,
Christopher Ferris86a48372019-01-10 14:14:59 -0800161 FUSE_COPY_FILE_RANGE = 47,
Tao Baod7db5942015-01-28 10:07:51 -0800162 CUSE_INIT = 4096,
Ben Cheng655a7c02013-10-16 16:09:24 -0700163};
164enum fuse_notify_code {
Tao Baod7db5942015-01-28 10:07:51 -0800165 FUSE_NOTIFY_POLL = 1,
166 FUSE_NOTIFY_INVAL_INODE = 2,
167 FUSE_NOTIFY_INVAL_ENTRY = 3,
168 FUSE_NOTIFY_STORE = 4,
Tao Baod7db5942015-01-28 10:07:51 -0800169 FUSE_NOTIFY_RETRIEVE = 5,
170 FUSE_NOTIFY_DELETE = 6,
171 FUSE_NOTIFY_CODE_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700172};
Ben Cheng655a7c02013-10-16 16:09:24 -0700173#define FUSE_MIN_READ_BUFFER 8192
174#define FUSE_COMPAT_ENTRY_OUT_SIZE 120
175struct fuse_entry_out {
Tao Baod7db5942015-01-28 10:07:51 -0800176 uint64_t nodeid;
Tao Baod7db5942015-01-28 10:07:51 -0800177 uint64_t generation;
178 uint64_t entry_valid;
179 uint64_t attr_valid;
180 uint32_t entry_valid_nsec;
Tao Baod7db5942015-01-28 10:07:51 -0800181 uint32_t attr_valid_nsec;
182 struct fuse_attr attr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700183};
184struct fuse_forget_in {
Tao Baod7db5942015-01-28 10:07:51 -0800185 uint64_t nlookup;
Ben Cheng655a7c02013-10-16 16:09:24 -0700186};
187struct fuse_forget_one {
Tao Baod7db5942015-01-28 10:07:51 -0800188 uint64_t nodeid;
Tao Baod7db5942015-01-28 10:07:51 -0800189 uint64_t nlookup;
Ben Cheng655a7c02013-10-16 16:09:24 -0700190};
191struct fuse_batch_forget_in {
Tao Baod7db5942015-01-28 10:07:51 -0800192 uint32_t count;
Tao Baod7db5942015-01-28 10:07:51 -0800193 uint32_t dummy;
Ben Cheng655a7c02013-10-16 16:09:24 -0700194};
195struct fuse_getattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800196 uint32_t getattr_flags;
Tao Baod7db5942015-01-28 10:07:51 -0800197 uint32_t dummy;
198 uint64_t fh;
Ben Cheng655a7c02013-10-16 16:09:24 -0700199};
200#define FUSE_COMPAT_ATTR_OUT_SIZE 96
Ben Cheng655a7c02013-10-16 16:09:24 -0700201struct fuse_attr_out {
Tao Baod7db5942015-01-28 10:07:51 -0800202 uint64_t attr_valid;
203 uint32_t attr_valid_nsec;
204 uint32_t dummy;
Tao Baod7db5942015-01-28 10:07:51 -0800205 struct fuse_attr attr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700206};
207#define FUSE_COMPAT_MKNOD_IN_SIZE 8
208struct fuse_mknod_in {
Tao Baod7db5942015-01-28 10:07:51 -0800209 uint32_t mode;
210 uint32_t rdev;
211 uint32_t umask;
212 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700213};
214struct fuse_mkdir_in {
Tao Baod7db5942015-01-28 10:07:51 -0800215 uint32_t mode;
216 uint32_t umask;
Ben Cheng655a7c02013-10-16 16:09:24 -0700217};
218struct fuse_rename_in {
Tao Baod7db5942015-01-28 10:07:51 -0800219 uint64_t newdir;
Ben Cheng655a7c02013-10-16 16:09:24 -0700220};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700221struct fuse_rename2_in {
Tao Baod7db5942015-01-28 10:07:51 -0800222 uint64_t newdir;
223 uint32_t flags;
224 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700225};
Ben Cheng655a7c02013-10-16 16:09:24 -0700226struct fuse_link_in {
Tao Baod7db5942015-01-28 10:07:51 -0800227 uint64_t oldnodeid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700228};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700229struct fuse_setattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800230 uint32_t valid;
231 uint32_t padding;
232 uint64_t fh;
Tao Baod7db5942015-01-28 10:07:51 -0800233 uint64_t size;
234 uint64_t lock_owner;
235 uint64_t atime;
236 uint64_t mtime;
Tao Baod7db5942015-01-28 10:07:51 -0800237 uint64_t ctime;
238 uint32_t atimensec;
239 uint32_t mtimensec;
240 uint32_t ctimensec;
Tao Baod7db5942015-01-28 10:07:51 -0800241 uint32_t mode;
242 uint32_t unused4;
243 uint32_t uid;
244 uint32_t gid;
Tao Baod7db5942015-01-28 10:07:51 -0800245 uint32_t unused5;
Ben Cheng655a7c02013-10-16 16:09:24 -0700246};
247struct fuse_open_in {
Tao Baod7db5942015-01-28 10:07:51 -0800248 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800249 uint32_t unused;
Ben Cheng655a7c02013-10-16 16:09:24 -0700250};
251struct fuse_create_in {
Tao Baod7db5942015-01-28 10:07:51 -0800252 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800253 uint32_t mode;
254 uint32_t umask;
255 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700256};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700257struct fuse_open_out {
Tao Baod7db5942015-01-28 10:07:51 -0800258 uint64_t fh;
259 uint32_t open_flags;
260 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700261};
Ben Cheng655a7c02013-10-16 16:09:24 -0700262struct fuse_release_in {
Tao Baod7db5942015-01-28 10:07:51 -0800263 uint64_t fh;
264 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800265 uint32_t release_flags;
266 uint64_t lock_owner;
Ben Cheng655a7c02013-10-16 16:09:24 -0700267};
268struct fuse_flush_in {
Tao Baod7db5942015-01-28 10:07:51 -0800269 uint64_t fh;
270 uint32_t unused;
271 uint32_t padding;
272 uint64_t lock_owner;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700273};
Ben Cheng655a7c02013-10-16 16:09:24 -0700274struct fuse_read_in {
Tao Baod7db5942015-01-28 10:07:51 -0800275 uint64_t fh;
276 uint64_t offset;
Tao Baod7db5942015-01-28 10:07:51 -0800277 uint32_t size;
278 uint32_t read_flags;
279 uint64_t lock_owner;
280 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800281 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700282};
283#define FUSE_COMPAT_WRITE_IN_SIZE 24
284struct fuse_write_in {
Tao Baod7db5942015-01-28 10:07:51 -0800285 uint64_t fh;
286 uint64_t offset;
287 uint32_t size;
288 uint32_t write_flags;
Tao Baod7db5942015-01-28 10:07:51 -0800289 uint64_t lock_owner;
290 uint32_t flags;
291 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700292};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700293struct fuse_write_out {
Tao Baod7db5942015-01-28 10:07:51 -0800294 uint32_t size;
295 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700296};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700297#define FUSE_COMPAT_STATFS_SIZE 48
Ben Cheng655a7c02013-10-16 16:09:24 -0700298struct fuse_statfs_out {
Tao Baod7db5942015-01-28 10:07:51 -0800299 struct fuse_kstatfs st;
Ben Cheng655a7c02013-10-16 16:09:24 -0700300};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700301struct fuse_fsync_in {
Tao Baod7db5942015-01-28 10:07:51 -0800302 uint64_t fh;
303 uint32_t fsync_flags;
304 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700305};
Ben Cheng655a7c02013-10-16 16:09:24 -0700306struct fuse_setxattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800307 uint32_t size;
308 uint32_t flags;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700309};
Ben Cheng655a7c02013-10-16 16:09:24 -0700310struct fuse_getxattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800311 uint32_t size;
312 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700313};
Ben Cheng655a7c02013-10-16 16:09:24 -0700314struct fuse_getxattr_out {
Tao Baod7db5942015-01-28 10:07:51 -0800315 uint32_t size;
316 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700317};
Ben Cheng655a7c02013-10-16 16:09:24 -0700318struct fuse_lk_in {
Tao Baod7db5942015-01-28 10:07:51 -0800319 uint64_t fh;
320 uint64_t owner;
Tao Baod7db5942015-01-28 10:07:51 -0800321 struct fuse_file_lock lk;
322 uint32_t lk_flags;
323 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700324};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700325struct fuse_lk_out {
Tao Baod7db5942015-01-28 10:07:51 -0800326 struct fuse_file_lock lk;
Ben Cheng655a7c02013-10-16 16:09:24 -0700327};
328struct fuse_access_in {
Tao Baod7db5942015-01-28 10:07:51 -0800329 uint32_t mask;
330 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700331};
332struct fuse_init_in {
Tao Baod7db5942015-01-28 10:07:51 -0800333 uint32_t major;
334 uint32_t minor;
335 uint32_t max_readahead;
336 uint32_t flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700337};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700338#define FUSE_COMPAT_INIT_OUT_SIZE 8
339#define FUSE_COMPAT_22_INIT_OUT_SIZE 24
Ben Cheng655a7c02013-10-16 16:09:24 -0700340struct fuse_init_out {
Tao Baod7db5942015-01-28 10:07:51 -0800341 uint32_t major;
342 uint32_t minor;
343 uint32_t max_readahead;
344 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800345 uint16_t max_background;
346 uint16_t congestion_threshold;
347 uint32_t max_write;
348 uint32_t time_gran;
Christopher Ferris86a48372019-01-10 14:14:59 -0800349 uint16_t max_pages;
350 uint16_t padding;
351 uint32_t unused[8];
Ben Cheng655a7c02013-10-16 16:09:24 -0700352};
353#define CUSE_INIT_INFO_MAX 4096
354struct cuse_init_in {
Tao Baod7db5942015-01-28 10:07:51 -0800355 uint32_t major;
356 uint32_t minor;
357 uint32_t unused;
358 uint32_t flags;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700359};
Ben Cheng655a7c02013-10-16 16:09:24 -0700360struct cuse_init_out {
Tao Baod7db5942015-01-28 10:07:51 -0800361 uint32_t major;
362 uint32_t minor;
Tao Baod7db5942015-01-28 10:07:51 -0800363 uint32_t unused;
364 uint32_t flags;
365 uint32_t max_read;
366 uint32_t max_write;
Tao Baod7db5942015-01-28 10:07:51 -0800367 uint32_t dev_major;
368 uint32_t dev_minor;
369 uint32_t spare[10];
Ben Cheng655a7c02013-10-16 16:09:24 -0700370};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700371struct fuse_interrupt_in {
Tao Baod7db5942015-01-28 10:07:51 -0800372 uint64_t unique;
Ben Cheng655a7c02013-10-16 16:09:24 -0700373};
374struct fuse_bmap_in {
Tao Baod7db5942015-01-28 10:07:51 -0800375 uint64_t block;
376 uint32_t blocksize;
377 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700378};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700379struct fuse_bmap_out {
Tao Baod7db5942015-01-28 10:07:51 -0800380 uint64_t block;
Ben Cheng655a7c02013-10-16 16:09:24 -0700381};
382struct fuse_ioctl_in {
Tao Baod7db5942015-01-28 10:07:51 -0800383 uint64_t fh;
384 uint32_t flags;
385 uint32_t cmd;
386 uint64_t arg;
Tao Baod7db5942015-01-28 10:07:51 -0800387 uint32_t in_size;
388 uint32_t out_size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700389};
390struct fuse_ioctl_iovec {
Tao Baod7db5942015-01-28 10:07:51 -0800391 uint64_t base;
392 uint64_t len;
Ben Cheng655a7c02013-10-16 16:09:24 -0700393};
394struct fuse_ioctl_out {
Tao Baod7db5942015-01-28 10:07:51 -0800395 int32_t result;
396 uint32_t flags;
397 uint32_t in_iovs;
398 uint32_t out_iovs;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700399};
Ben Cheng655a7c02013-10-16 16:09:24 -0700400struct fuse_poll_in {
Tao Baod7db5942015-01-28 10:07:51 -0800401 uint64_t fh;
402 uint64_t kh;
Tao Baod7db5942015-01-28 10:07:51 -0800403 uint32_t flags;
404 uint32_t events;
Ben Cheng655a7c02013-10-16 16:09:24 -0700405};
406struct fuse_poll_out {
Tao Baod7db5942015-01-28 10:07:51 -0800407 uint32_t revents;
408 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700409};
410struct fuse_notify_poll_wakeup_out {
Tao Baod7db5942015-01-28 10:07:51 -0800411 uint64_t kh;
Ben Cheng655a7c02013-10-16 16:09:24 -0700412};
413struct fuse_fallocate_in {
Tao Baod7db5942015-01-28 10:07:51 -0800414 uint64_t fh;
Tao Baod7db5942015-01-28 10:07:51 -0800415 uint64_t offset;
416 uint64_t length;
417 uint32_t mode;
418 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700419};
Ben Cheng655a7c02013-10-16 16:09:24 -0700420struct fuse_in_header {
Tao Baod7db5942015-01-28 10:07:51 -0800421 uint32_t len;
422 uint32_t opcode;
Tao Baod7db5942015-01-28 10:07:51 -0800423 uint64_t unique;
424 uint64_t nodeid;
425 uint32_t uid;
426 uint32_t gid;
Tao Baod7db5942015-01-28 10:07:51 -0800427 uint32_t pid;
428 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700429};
430struct fuse_out_header {
Tao Baod7db5942015-01-28 10:07:51 -0800431 uint32_t len;
432 int32_t error;
433 uint64_t unique;
Ben Cheng655a7c02013-10-16 16:09:24 -0700434};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700435struct fuse_dirent {
Tao Baod7db5942015-01-28 10:07:51 -0800436 uint64_t ino;
437 uint64_t off;
438 uint32_t namelen;
Tao Baod7db5942015-01-28 10:07:51 -0800439 uint32_t type;
440 char name[];
Ben Cheng655a7c02013-10-16 16:09:24 -0700441};
442#define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
Tao Baod7db5942015-01-28 10:07:51 -0800443#define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1))
444#define FUSE_DIRENT_SIZE(d) FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
Ben Cheng655a7c02013-10-16 16:09:24 -0700445struct fuse_direntplus {
Tao Baod7db5942015-01-28 10:07:51 -0800446 struct fuse_entry_out entry_out;
Tao Baod7db5942015-01-28 10:07:51 -0800447 struct fuse_dirent dirent;
Ben Cheng655a7c02013-10-16 16:09:24 -0700448};
Tao Baod7db5942015-01-28 10:07:51 -0800449#define FUSE_NAME_OFFSET_DIRENTPLUS offsetof(struct fuse_direntplus, dirent.name)
450#define FUSE_DIRENTPLUS_SIZE(d) FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700451struct fuse_notify_inval_inode_out {
Tao Baod7db5942015-01-28 10:07:51 -0800452 uint64_t ino;
453 int64_t off;
454 int64_t len;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700455};
Ben Cheng655a7c02013-10-16 16:09:24 -0700456struct fuse_notify_inval_entry_out {
Tao Baod7db5942015-01-28 10:07:51 -0800457 uint64_t parent;
458 uint32_t namelen;
Tao Baod7db5942015-01-28 10:07:51 -0800459 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700460};
461struct fuse_notify_delete_out {
Tao Baod7db5942015-01-28 10:07:51 -0800462 uint64_t parent;
Tao Baod7db5942015-01-28 10:07:51 -0800463 uint64_t child;
464 uint32_t namelen;
465 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700466};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700467struct fuse_notify_store_out {
Tao Baod7db5942015-01-28 10:07:51 -0800468 uint64_t nodeid;
469 uint64_t offset;
470 uint32_t size;
Tao Baod7db5942015-01-28 10:07:51 -0800471 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700472};
473struct fuse_notify_retrieve_out {
Tao Baod7db5942015-01-28 10:07:51 -0800474 uint64_t notify_unique;
Tao Baod7db5942015-01-28 10:07:51 -0800475 uint64_t nodeid;
476 uint64_t offset;
477 uint32_t size;
478 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700479};
Ben Cheng655a7c02013-10-16 16:09:24 -0700480struct fuse_notify_retrieve_in {
Tao Baod7db5942015-01-28 10:07:51 -0800481 uint64_t dummy1;
482 uint64_t offset;
Tao Baod7db5942015-01-28 10:07:51 -0800483 uint32_t size;
484 uint32_t dummy2;
485 uint64_t dummy3;
486 uint64_t dummy4;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700487};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800488#define FUSE_DEV_IOC_CLONE _IOR(229, 0, uint32_t)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700489struct fuse_lseek_in {
490 uint64_t fh;
491 uint64_t offset;
492 uint32_t whence;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700493 uint32_t padding;
494};
495struct fuse_lseek_out {
496 uint64_t offset;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700497};
Christopher Ferris86a48372019-01-10 14:14:59 -0800498struct fuse_copy_file_range_in {
499 uint64_t fh_in;
500 uint64_t off_in;
501 uint64_t nodeid_out;
502 uint64_t fh_out;
503 uint64_t off_out;
504 uint64_t len;
505 uint64_t flags;
506};
Ben Cheng655a7c02013-10-16 16:09:24 -0700507#endif