blob: 42f9ed6216c947519a429bc495a689db47a5dd7a [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 Ferris6a9755d2017-01-13 14:09:31 -080023#define FUSE_KERNEL_MINOR_VERSION 26
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 Ferrisba8d4f42014-09-03 19:56:49 -070075#define FUSE_ASYNC_READ (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -070076#define FUSE_POSIX_LOCKS (1 << 1)
77#define FUSE_FILE_OPS (1 << 2)
78#define FUSE_ATOMIC_O_TRUNC (1 << 3)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070079#define FUSE_EXPORT_SUPPORT (1 << 4)
Ben Cheng655a7c02013-10-16 16:09:24 -070080#define FUSE_BIG_WRITES (1 << 5)
81#define FUSE_DONT_MASK (1 << 6)
82#define FUSE_SPLICE_WRITE (1 << 7)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070083#define FUSE_SPLICE_MOVE (1 << 8)
Ben Cheng655a7c02013-10-16 16:09:24 -070084#define FUSE_SPLICE_READ (1 << 9)
85#define FUSE_FLOCK_LOCKS (1 << 10)
86#define FUSE_HAS_IOCTL_DIR (1 << 11)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070087#define FUSE_AUTO_INVAL_DATA (1 << 12)
Ben Cheng655a7c02013-10-16 16:09:24 -070088#define FUSE_DO_READDIRPLUS (1 << 13)
89#define FUSE_READDIRPLUS_AUTO (1 << 14)
90#define FUSE_ASYNC_DIO (1 << 15)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070091#define FUSE_WRITEBACK_CACHE (1 << 16)
92#define FUSE_NO_OPEN_SUPPORT (1 << 17)
Christopher Ferris106b3a82016-08-24 12:15:38 -070093#define FUSE_PARALLEL_DIROPS (1 << 18)
Christopher Ferris6a9755d2017-01-13 14:09:31 -080094#define FUSE_HANDLE_KILLPRIV (1 << 19)
Christopher Ferris6a9755d2017-01-13 14:09:31 -080095#define FUSE_POSIX_ACL (1 << 20)
96#define CUSE_UNRESTRICTED_IOCTL (1 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -070097#define FUSE_RELEASE_FLUSH (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -070098#define FUSE_RELEASE_FLOCK_UNLOCK (1 << 1)
99#define FUSE_GETATTR_FH (1 << 0)
100#define FUSE_LK_FLOCK (1 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700101#define FUSE_WRITE_CACHE (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700102#define FUSE_WRITE_LOCKOWNER (1 << 1)
103#define FUSE_READ_LOCKOWNER (1 << 1)
104#define FUSE_IOCTL_COMPAT (1 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700105#define FUSE_IOCTL_UNRESTRICTED (1 << 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700106#define FUSE_IOCTL_RETRY (1 << 2)
107#define FUSE_IOCTL_32BIT (1 << 3)
108#define FUSE_IOCTL_DIR (1 << 4)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700109#define FUSE_IOCTL_MAX_IOV 256
Ben Cheng655a7c02013-10-16 16:09:24 -0700110#define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)
111enum fuse_opcode {
Tao Baod7db5942015-01-28 10:07:51 -0800112 FUSE_LOOKUP = 1,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700113 FUSE_FORGET = 2,
Tao Baod7db5942015-01-28 10:07:51 -0800114 FUSE_GETATTR = 3,
115 FUSE_SETATTR = 4,
116 FUSE_READLINK = 5,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700117 FUSE_SYMLINK = 6,
Tao Baod7db5942015-01-28 10:07:51 -0800118 FUSE_MKNOD = 8,
119 FUSE_MKDIR = 9,
120 FUSE_UNLINK = 10,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700121 FUSE_RMDIR = 11,
Tao Baod7db5942015-01-28 10:07:51 -0800122 FUSE_RENAME = 12,
123 FUSE_LINK = 13,
124 FUSE_OPEN = 14,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700125 FUSE_READ = 15,
Tao Baod7db5942015-01-28 10:07:51 -0800126 FUSE_WRITE = 16,
127 FUSE_STATFS = 17,
128 FUSE_RELEASE = 18,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700129 FUSE_FSYNC = 20,
Tao Baod7db5942015-01-28 10:07:51 -0800130 FUSE_SETXATTR = 21,
131 FUSE_GETXATTR = 22,
132 FUSE_LISTXATTR = 23,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700133 FUSE_REMOVEXATTR = 24,
Tao Baod7db5942015-01-28 10:07:51 -0800134 FUSE_FLUSH = 25,
135 FUSE_INIT = 26,
136 FUSE_OPENDIR = 27,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700137 FUSE_READDIR = 28,
Tao Baod7db5942015-01-28 10:07:51 -0800138 FUSE_RELEASEDIR = 29,
139 FUSE_FSYNCDIR = 30,
140 FUSE_GETLK = 31,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700141 FUSE_SETLK = 32,
Tao Baod7db5942015-01-28 10:07:51 -0800142 FUSE_SETLKW = 33,
143 FUSE_ACCESS = 34,
144 FUSE_CREATE = 35,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700145 FUSE_INTERRUPT = 36,
Tao Baod7db5942015-01-28 10:07:51 -0800146 FUSE_BMAP = 37,
147 FUSE_DESTROY = 38,
148 FUSE_IOCTL = 39,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700149 FUSE_POLL = 40,
Tao Baod7db5942015-01-28 10:07:51 -0800150 FUSE_NOTIFY_REPLY = 41,
151 FUSE_BATCH_FORGET = 42,
152 FUSE_FALLOCATE = 43,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700153 FUSE_READDIRPLUS = 44,
Tao Baod7db5942015-01-28 10:07:51 -0800154 FUSE_RENAME2 = 45,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700155 FUSE_LSEEK = 46,
Tao Baod7db5942015-01-28 10:07:51 -0800156 CUSE_INIT = 4096,
Ben Cheng655a7c02013-10-16 16:09:24 -0700157};
158enum fuse_notify_code {
Tao Baod7db5942015-01-28 10:07:51 -0800159 FUSE_NOTIFY_POLL = 1,
160 FUSE_NOTIFY_INVAL_INODE = 2,
161 FUSE_NOTIFY_INVAL_ENTRY = 3,
162 FUSE_NOTIFY_STORE = 4,
Tao Baod7db5942015-01-28 10:07:51 -0800163 FUSE_NOTIFY_RETRIEVE = 5,
164 FUSE_NOTIFY_DELETE = 6,
165 FUSE_NOTIFY_CODE_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700166};
Ben Cheng655a7c02013-10-16 16:09:24 -0700167#define FUSE_MIN_READ_BUFFER 8192
168#define FUSE_COMPAT_ENTRY_OUT_SIZE 120
169struct fuse_entry_out {
Tao Baod7db5942015-01-28 10:07:51 -0800170 uint64_t nodeid;
Tao Baod7db5942015-01-28 10:07:51 -0800171 uint64_t generation;
172 uint64_t entry_valid;
173 uint64_t attr_valid;
174 uint32_t entry_valid_nsec;
Tao Baod7db5942015-01-28 10:07:51 -0800175 uint32_t attr_valid_nsec;
176 struct fuse_attr attr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700177};
178struct fuse_forget_in {
Tao Baod7db5942015-01-28 10:07:51 -0800179 uint64_t nlookup;
Ben Cheng655a7c02013-10-16 16:09:24 -0700180};
181struct fuse_forget_one {
Tao Baod7db5942015-01-28 10:07:51 -0800182 uint64_t nodeid;
Tao Baod7db5942015-01-28 10:07:51 -0800183 uint64_t nlookup;
Ben Cheng655a7c02013-10-16 16:09:24 -0700184};
185struct fuse_batch_forget_in {
Tao Baod7db5942015-01-28 10:07:51 -0800186 uint32_t count;
Tao Baod7db5942015-01-28 10:07:51 -0800187 uint32_t dummy;
Ben Cheng655a7c02013-10-16 16:09:24 -0700188};
189struct fuse_getattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800190 uint32_t getattr_flags;
Tao Baod7db5942015-01-28 10:07:51 -0800191 uint32_t dummy;
192 uint64_t fh;
Ben Cheng655a7c02013-10-16 16:09:24 -0700193};
194#define FUSE_COMPAT_ATTR_OUT_SIZE 96
Ben Cheng655a7c02013-10-16 16:09:24 -0700195struct fuse_attr_out {
Tao Baod7db5942015-01-28 10:07:51 -0800196 uint64_t attr_valid;
197 uint32_t attr_valid_nsec;
198 uint32_t dummy;
Tao Baod7db5942015-01-28 10:07:51 -0800199 struct fuse_attr attr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700200};
201#define FUSE_COMPAT_MKNOD_IN_SIZE 8
202struct fuse_mknod_in {
Tao Baod7db5942015-01-28 10:07:51 -0800203 uint32_t mode;
204 uint32_t rdev;
205 uint32_t umask;
206 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700207};
208struct fuse_mkdir_in {
Tao Baod7db5942015-01-28 10:07:51 -0800209 uint32_t mode;
210 uint32_t umask;
Ben Cheng655a7c02013-10-16 16:09:24 -0700211};
212struct fuse_rename_in {
Tao Baod7db5942015-01-28 10:07:51 -0800213 uint64_t newdir;
Ben Cheng655a7c02013-10-16 16:09:24 -0700214};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700215struct fuse_rename2_in {
Tao Baod7db5942015-01-28 10:07:51 -0800216 uint64_t newdir;
217 uint32_t flags;
218 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700219};
Ben Cheng655a7c02013-10-16 16:09:24 -0700220struct fuse_link_in {
Tao Baod7db5942015-01-28 10:07:51 -0800221 uint64_t oldnodeid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700222};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700223struct fuse_setattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800224 uint32_t valid;
225 uint32_t padding;
226 uint64_t fh;
Tao Baod7db5942015-01-28 10:07:51 -0800227 uint64_t size;
228 uint64_t lock_owner;
229 uint64_t atime;
230 uint64_t mtime;
Tao Baod7db5942015-01-28 10:07:51 -0800231 uint64_t ctime;
232 uint32_t atimensec;
233 uint32_t mtimensec;
234 uint32_t ctimensec;
Tao Baod7db5942015-01-28 10:07:51 -0800235 uint32_t mode;
236 uint32_t unused4;
237 uint32_t uid;
238 uint32_t gid;
Tao Baod7db5942015-01-28 10:07:51 -0800239 uint32_t unused5;
Ben Cheng655a7c02013-10-16 16:09:24 -0700240};
241struct fuse_open_in {
Tao Baod7db5942015-01-28 10:07:51 -0800242 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800243 uint32_t unused;
Ben Cheng655a7c02013-10-16 16:09:24 -0700244};
245struct fuse_create_in {
Tao Baod7db5942015-01-28 10:07:51 -0800246 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800247 uint32_t mode;
248 uint32_t umask;
249 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700250};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700251struct fuse_open_out {
Tao Baod7db5942015-01-28 10:07:51 -0800252 uint64_t fh;
253 uint32_t open_flags;
254 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700255};
Ben Cheng655a7c02013-10-16 16:09:24 -0700256struct fuse_release_in {
Tao Baod7db5942015-01-28 10:07:51 -0800257 uint64_t fh;
258 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800259 uint32_t release_flags;
260 uint64_t lock_owner;
Ben Cheng655a7c02013-10-16 16:09:24 -0700261};
262struct fuse_flush_in {
Tao Baod7db5942015-01-28 10:07:51 -0800263 uint64_t fh;
264 uint32_t unused;
265 uint32_t padding;
266 uint64_t lock_owner;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700267};
Ben Cheng655a7c02013-10-16 16:09:24 -0700268struct fuse_read_in {
Tao Baod7db5942015-01-28 10:07:51 -0800269 uint64_t fh;
270 uint64_t offset;
Tao Baod7db5942015-01-28 10:07:51 -0800271 uint32_t size;
272 uint32_t read_flags;
273 uint64_t lock_owner;
274 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800275 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700276};
277#define FUSE_COMPAT_WRITE_IN_SIZE 24
278struct fuse_write_in {
Tao Baod7db5942015-01-28 10:07:51 -0800279 uint64_t fh;
280 uint64_t offset;
281 uint32_t size;
282 uint32_t write_flags;
Tao Baod7db5942015-01-28 10:07:51 -0800283 uint64_t lock_owner;
284 uint32_t flags;
285 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700286};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700287struct fuse_write_out {
Tao Baod7db5942015-01-28 10:07:51 -0800288 uint32_t size;
289 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700290};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700291#define FUSE_COMPAT_STATFS_SIZE 48
Ben Cheng655a7c02013-10-16 16:09:24 -0700292struct fuse_statfs_out {
Tao Baod7db5942015-01-28 10:07:51 -0800293 struct fuse_kstatfs st;
Ben Cheng655a7c02013-10-16 16:09:24 -0700294};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700295struct fuse_fsync_in {
Tao Baod7db5942015-01-28 10:07:51 -0800296 uint64_t fh;
297 uint32_t fsync_flags;
298 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700299};
Ben Cheng655a7c02013-10-16 16:09:24 -0700300struct fuse_setxattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800301 uint32_t size;
302 uint32_t flags;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700303};
Ben Cheng655a7c02013-10-16 16:09:24 -0700304struct fuse_getxattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800305 uint32_t size;
306 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700307};
Ben Cheng655a7c02013-10-16 16:09:24 -0700308struct fuse_getxattr_out {
Tao Baod7db5942015-01-28 10:07:51 -0800309 uint32_t size;
310 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700311};
Ben Cheng655a7c02013-10-16 16:09:24 -0700312struct fuse_lk_in {
Tao Baod7db5942015-01-28 10:07:51 -0800313 uint64_t fh;
314 uint64_t owner;
Tao Baod7db5942015-01-28 10:07:51 -0800315 struct fuse_file_lock lk;
316 uint32_t lk_flags;
317 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700318};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700319struct fuse_lk_out {
Tao Baod7db5942015-01-28 10:07:51 -0800320 struct fuse_file_lock lk;
Ben Cheng655a7c02013-10-16 16:09:24 -0700321};
322struct fuse_access_in {
Tao Baod7db5942015-01-28 10:07:51 -0800323 uint32_t mask;
324 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700325};
326struct fuse_init_in {
Tao Baod7db5942015-01-28 10:07:51 -0800327 uint32_t major;
328 uint32_t minor;
329 uint32_t max_readahead;
330 uint32_t flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700331};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700332#define FUSE_COMPAT_INIT_OUT_SIZE 8
333#define FUSE_COMPAT_22_INIT_OUT_SIZE 24
Ben Cheng655a7c02013-10-16 16:09:24 -0700334struct fuse_init_out {
Tao Baod7db5942015-01-28 10:07:51 -0800335 uint32_t major;
336 uint32_t minor;
337 uint32_t max_readahead;
338 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800339 uint16_t max_background;
340 uint16_t congestion_threshold;
341 uint32_t max_write;
342 uint32_t time_gran;
Tao Baod7db5942015-01-28 10:07:51 -0800343 uint32_t unused[9];
Ben Cheng655a7c02013-10-16 16:09:24 -0700344};
345#define CUSE_INIT_INFO_MAX 4096
346struct cuse_init_in {
Tao Baod7db5942015-01-28 10:07:51 -0800347 uint32_t major;
348 uint32_t minor;
349 uint32_t unused;
350 uint32_t flags;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700351};
Ben Cheng655a7c02013-10-16 16:09:24 -0700352struct cuse_init_out {
Tao Baod7db5942015-01-28 10:07:51 -0800353 uint32_t major;
354 uint32_t minor;
Tao Baod7db5942015-01-28 10:07:51 -0800355 uint32_t unused;
356 uint32_t flags;
357 uint32_t max_read;
358 uint32_t max_write;
Tao Baod7db5942015-01-28 10:07:51 -0800359 uint32_t dev_major;
360 uint32_t dev_minor;
361 uint32_t spare[10];
Ben Cheng655a7c02013-10-16 16:09:24 -0700362};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700363struct fuse_interrupt_in {
Tao Baod7db5942015-01-28 10:07:51 -0800364 uint64_t unique;
Ben Cheng655a7c02013-10-16 16:09:24 -0700365};
366struct fuse_bmap_in {
Tao Baod7db5942015-01-28 10:07:51 -0800367 uint64_t block;
368 uint32_t blocksize;
369 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700370};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700371struct fuse_bmap_out {
Tao Baod7db5942015-01-28 10:07:51 -0800372 uint64_t block;
Ben Cheng655a7c02013-10-16 16:09:24 -0700373};
374struct fuse_ioctl_in {
Tao Baod7db5942015-01-28 10:07:51 -0800375 uint64_t fh;
376 uint32_t flags;
377 uint32_t cmd;
378 uint64_t arg;
Tao Baod7db5942015-01-28 10:07:51 -0800379 uint32_t in_size;
380 uint32_t out_size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700381};
382struct fuse_ioctl_iovec {
Tao Baod7db5942015-01-28 10:07:51 -0800383 uint64_t base;
384 uint64_t len;
Ben Cheng655a7c02013-10-16 16:09:24 -0700385};
386struct fuse_ioctl_out {
Tao Baod7db5942015-01-28 10:07:51 -0800387 int32_t result;
388 uint32_t flags;
389 uint32_t in_iovs;
390 uint32_t out_iovs;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700391};
Ben Cheng655a7c02013-10-16 16:09:24 -0700392struct fuse_poll_in {
Tao Baod7db5942015-01-28 10:07:51 -0800393 uint64_t fh;
394 uint64_t kh;
Tao Baod7db5942015-01-28 10:07:51 -0800395 uint32_t flags;
396 uint32_t events;
Ben Cheng655a7c02013-10-16 16:09:24 -0700397};
398struct fuse_poll_out {
Tao Baod7db5942015-01-28 10:07:51 -0800399 uint32_t revents;
400 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700401};
402struct fuse_notify_poll_wakeup_out {
Tao Baod7db5942015-01-28 10:07:51 -0800403 uint64_t kh;
Ben Cheng655a7c02013-10-16 16:09:24 -0700404};
405struct fuse_fallocate_in {
Tao Baod7db5942015-01-28 10:07:51 -0800406 uint64_t fh;
Tao Baod7db5942015-01-28 10:07:51 -0800407 uint64_t offset;
408 uint64_t length;
409 uint32_t mode;
410 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700411};
Ben Cheng655a7c02013-10-16 16:09:24 -0700412struct fuse_in_header {
Tao Baod7db5942015-01-28 10:07:51 -0800413 uint32_t len;
414 uint32_t opcode;
Tao Baod7db5942015-01-28 10:07:51 -0800415 uint64_t unique;
416 uint64_t nodeid;
417 uint32_t uid;
418 uint32_t gid;
Tao Baod7db5942015-01-28 10:07:51 -0800419 uint32_t pid;
420 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700421};
422struct fuse_out_header {
Tao Baod7db5942015-01-28 10:07:51 -0800423 uint32_t len;
424 int32_t error;
425 uint64_t unique;
Ben Cheng655a7c02013-10-16 16:09:24 -0700426};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700427struct fuse_dirent {
Tao Baod7db5942015-01-28 10:07:51 -0800428 uint64_t ino;
429 uint64_t off;
430 uint32_t namelen;
Tao Baod7db5942015-01-28 10:07:51 -0800431 uint32_t type;
432 char name[];
Ben Cheng655a7c02013-10-16 16:09:24 -0700433};
434#define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
Tao Baod7db5942015-01-28 10:07:51 -0800435#define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1))
436#define FUSE_DIRENT_SIZE(d) FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
Ben Cheng655a7c02013-10-16 16:09:24 -0700437struct fuse_direntplus {
Tao Baod7db5942015-01-28 10:07:51 -0800438 struct fuse_entry_out entry_out;
Tao Baod7db5942015-01-28 10:07:51 -0800439 struct fuse_dirent dirent;
Ben Cheng655a7c02013-10-16 16:09:24 -0700440};
Tao Baod7db5942015-01-28 10:07:51 -0800441#define FUSE_NAME_OFFSET_DIRENTPLUS offsetof(struct fuse_direntplus, dirent.name)
442#define FUSE_DIRENTPLUS_SIZE(d) FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700443struct fuse_notify_inval_inode_out {
Tao Baod7db5942015-01-28 10:07:51 -0800444 uint64_t ino;
445 int64_t off;
446 int64_t len;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700447};
Ben Cheng655a7c02013-10-16 16:09:24 -0700448struct fuse_notify_inval_entry_out {
Tao Baod7db5942015-01-28 10:07:51 -0800449 uint64_t parent;
450 uint32_t namelen;
Tao Baod7db5942015-01-28 10:07:51 -0800451 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700452};
453struct fuse_notify_delete_out {
Tao Baod7db5942015-01-28 10:07:51 -0800454 uint64_t parent;
Tao Baod7db5942015-01-28 10:07:51 -0800455 uint64_t child;
456 uint32_t namelen;
457 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700458};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700459struct fuse_notify_store_out {
Tao Baod7db5942015-01-28 10:07:51 -0800460 uint64_t nodeid;
461 uint64_t offset;
462 uint32_t size;
Tao Baod7db5942015-01-28 10:07:51 -0800463 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700464};
465struct fuse_notify_retrieve_out {
Tao Baod7db5942015-01-28 10:07:51 -0800466 uint64_t notify_unique;
Tao Baod7db5942015-01-28 10:07:51 -0800467 uint64_t nodeid;
468 uint64_t offset;
469 uint32_t size;
470 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700471};
Ben Cheng655a7c02013-10-16 16:09:24 -0700472struct fuse_notify_retrieve_in {
Tao Baod7db5942015-01-28 10:07:51 -0800473 uint64_t dummy1;
474 uint64_t offset;
Tao Baod7db5942015-01-28 10:07:51 -0800475 uint32_t size;
476 uint32_t dummy2;
477 uint64_t dummy3;
478 uint64_t dummy4;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700479};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800480#define FUSE_DEV_IOC_CLONE _IOR(229, 0, uint32_t)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700481struct fuse_lseek_in {
482 uint64_t fh;
483 uint64_t offset;
484 uint32_t whence;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700485 uint32_t padding;
486};
487struct fuse_lseek_out {
488 uint64_t offset;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700489};
Ben Cheng655a7c02013-10-16 16:09:24 -0700490#endif