blob: a727580c2c9292bac71ad57f5a51f39d7b560c45 [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 Ferris9ce28842018-10-25 12:11:39 -070023#define FUSE_KERNEL_MINOR_VERSION 27
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)
Christopher Ferris9ce28842018-10-25 12:11:39 -070096#define FUSE_ABORT_ERROR (1 << 21)
Christopher Ferris6a9755d2017-01-13 14:09:31 -080097#define CUSE_UNRESTRICTED_IOCTL (1 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -070098#define FUSE_RELEASE_FLUSH (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -070099#define FUSE_RELEASE_FLOCK_UNLOCK (1 << 1)
100#define FUSE_GETATTR_FH (1 << 0)
101#define FUSE_LK_FLOCK (1 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700102#define FUSE_WRITE_CACHE (1 << 0)
Ben Cheng655a7c02013-10-16 16:09:24 -0700103#define FUSE_WRITE_LOCKOWNER (1 << 1)
104#define FUSE_READ_LOCKOWNER (1 << 1)
105#define FUSE_IOCTL_COMPAT (1 << 0)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700106#define FUSE_IOCTL_UNRESTRICTED (1 << 1)
Ben Cheng655a7c02013-10-16 16:09:24 -0700107#define FUSE_IOCTL_RETRY (1 << 2)
108#define FUSE_IOCTL_32BIT (1 << 3)
109#define FUSE_IOCTL_DIR (1 << 4)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700110#define FUSE_IOCTL_MAX_IOV 256
Ben Cheng655a7c02013-10-16 16:09:24 -0700111#define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)
112enum fuse_opcode {
Tao Baod7db5942015-01-28 10:07:51 -0800113 FUSE_LOOKUP = 1,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700114 FUSE_FORGET = 2,
Tao Baod7db5942015-01-28 10:07:51 -0800115 FUSE_GETATTR = 3,
116 FUSE_SETATTR = 4,
117 FUSE_READLINK = 5,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700118 FUSE_SYMLINK = 6,
Tao Baod7db5942015-01-28 10:07:51 -0800119 FUSE_MKNOD = 8,
120 FUSE_MKDIR = 9,
121 FUSE_UNLINK = 10,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700122 FUSE_RMDIR = 11,
Tao Baod7db5942015-01-28 10:07:51 -0800123 FUSE_RENAME = 12,
124 FUSE_LINK = 13,
125 FUSE_OPEN = 14,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700126 FUSE_READ = 15,
Tao Baod7db5942015-01-28 10:07:51 -0800127 FUSE_WRITE = 16,
128 FUSE_STATFS = 17,
129 FUSE_RELEASE = 18,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700130 FUSE_FSYNC = 20,
Tao Baod7db5942015-01-28 10:07:51 -0800131 FUSE_SETXATTR = 21,
132 FUSE_GETXATTR = 22,
133 FUSE_LISTXATTR = 23,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700134 FUSE_REMOVEXATTR = 24,
Tao Baod7db5942015-01-28 10:07:51 -0800135 FUSE_FLUSH = 25,
136 FUSE_INIT = 26,
137 FUSE_OPENDIR = 27,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700138 FUSE_READDIR = 28,
Tao Baod7db5942015-01-28 10:07:51 -0800139 FUSE_RELEASEDIR = 29,
140 FUSE_FSYNCDIR = 30,
141 FUSE_GETLK = 31,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700142 FUSE_SETLK = 32,
Tao Baod7db5942015-01-28 10:07:51 -0800143 FUSE_SETLKW = 33,
144 FUSE_ACCESS = 34,
145 FUSE_CREATE = 35,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700146 FUSE_INTERRUPT = 36,
Tao Baod7db5942015-01-28 10:07:51 -0800147 FUSE_BMAP = 37,
148 FUSE_DESTROY = 38,
149 FUSE_IOCTL = 39,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700150 FUSE_POLL = 40,
Tao Baod7db5942015-01-28 10:07:51 -0800151 FUSE_NOTIFY_REPLY = 41,
152 FUSE_BATCH_FORGET = 42,
153 FUSE_FALLOCATE = 43,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700154 FUSE_READDIRPLUS = 44,
Tao Baod7db5942015-01-28 10:07:51 -0800155 FUSE_RENAME2 = 45,
Christopher Ferris106b3a82016-08-24 12:15:38 -0700156 FUSE_LSEEK = 46,
Tao Baod7db5942015-01-28 10:07:51 -0800157 CUSE_INIT = 4096,
Ben Cheng655a7c02013-10-16 16:09:24 -0700158};
159enum fuse_notify_code {
Tao Baod7db5942015-01-28 10:07:51 -0800160 FUSE_NOTIFY_POLL = 1,
161 FUSE_NOTIFY_INVAL_INODE = 2,
162 FUSE_NOTIFY_INVAL_ENTRY = 3,
163 FUSE_NOTIFY_STORE = 4,
Tao Baod7db5942015-01-28 10:07:51 -0800164 FUSE_NOTIFY_RETRIEVE = 5,
165 FUSE_NOTIFY_DELETE = 6,
166 FUSE_NOTIFY_CODE_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -0700167};
Ben Cheng655a7c02013-10-16 16:09:24 -0700168#define FUSE_MIN_READ_BUFFER 8192
169#define FUSE_COMPAT_ENTRY_OUT_SIZE 120
170struct fuse_entry_out {
Tao Baod7db5942015-01-28 10:07:51 -0800171 uint64_t nodeid;
Tao Baod7db5942015-01-28 10:07:51 -0800172 uint64_t generation;
173 uint64_t entry_valid;
174 uint64_t attr_valid;
175 uint32_t entry_valid_nsec;
Tao Baod7db5942015-01-28 10:07:51 -0800176 uint32_t attr_valid_nsec;
177 struct fuse_attr attr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700178};
179struct fuse_forget_in {
Tao Baod7db5942015-01-28 10:07:51 -0800180 uint64_t nlookup;
Ben Cheng655a7c02013-10-16 16:09:24 -0700181};
182struct fuse_forget_one {
Tao Baod7db5942015-01-28 10:07:51 -0800183 uint64_t nodeid;
Tao Baod7db5942015-01-28 10:07:51 -0800184 uint64_t nlookup;
Ben Cheng655a7c02013-10-16 16:09:24 -0700185};
186struct fuse_batch_forget_in {
Tao Baod7db5942015-01-28 10:07:51 -0800187 uint32_t count;
Tao Baod7db5942015-01-28 10:07:51 -0800188 uint32_t dummy;
Ben Cheng655a7c02013-10-16 16:09:24 -0700189};
190struct fuse_getattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800191 uint32_t getattr_flags;
Tao Baod7db5942015-01-28 10:07:51 -0800192 uint32_t dummy;
193 uint64_t fh;
Ben Cheng655a7c02013-10-16 16:09:24 -0700194};
195#define FUSE_COMPAT_ATTR_OUT_SIZE 96
Ben Cheng655a7c02013-10-16 16:09:24 -0700196struct fuse_attr_out {
Tao Baod7db5942015-01-28 10:07:51 -0800197 uint64_t attr_valid;
198 uint32_t attr_valid_nsec;
199 uint32_t dummy;
Tao Baod7db5942015-01-28 10:07:51 -0800200 struct fuse_attr attr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700201};
202#define FUSE_COMPAT_MKNOD_IN_SIZE 8
203struct fuse_mknod_in {
Tao Baod7db5942015-01-28 10:07:51 -0800204 uint32_t mode;
205 uint32_t rdev;
206 uint32_t umask;
207 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700208};
209struct fuse_mkdir_in {
Tao Baod7db5942015-01-28 10:07:51 -0800210 uint32_t mode;
211 uint32_t umask;
Ben Cheng655a7c02013-10-16 16:09:24 -0700212};
213struct fuse_rename_in {
Tao Baod7db5942015-01-28 10:07:51 -0800214 uint64_t newdir;
Ben Cheng655a7c02013-10-16 16:09:24 -0700215};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700216struct fuse_rename2_in {
Tao Baod7db5942015-01-28 10:07:51 -0800217 uint64_t newdir;
218 uint32_t flags;
219 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700220};
Ben Cheng655a7c02013-10-16 16:09:24 -0700221struct fuse_link_in {
Tao Baod7db5942015-01-28 10:07:51 -0800222 uint64_t oldnodeid;
Ben Cheng655a7c02013-10-16 16:09:24 -0700223};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700224struct fuse_setattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800225 uint32_t valid;
226 uint32_t padding;
227 uint64_t fh;
Tao Baod7db5942015-01-28 10:07:51 -0800228 uint64_t size;
229 uint64_t lock_owner;
230 uint64_t atime;
231 uint64_t mtime;
Tao Baod7db5942015-01-28 10:07:51 -0800232 uint64_t ctime;
233 uint32_t atimensec;
234 uint32_t mtimensec;
235 uint32_t ctimensec;
Tao Baod7db5942015-01-28 10:07:51 -0800236 uint32_t mode;
237 uint32_t unused4;
238 uint32_t uid;
239 uint32_t gid;
Tao Baod7db5942015-01-28 10:07:51 -0800240 uint32_t unused5;
Ben Cheng655a7c02013-10-16 16:09:24 -0700241};
242struct fuse_open_in {
Tao Baod7db5942015-01-28 10:07:51 -0800243 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800244 uint32_t unused;
Ben Cheng655a7c02013-10-16 16:09:24 -0700245};
246struct fuse_create_in {
Tao Baod7db5942015-01-28 10:07:51 -0800247 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800248 uint32_t mode;
249 uint32_t umask;
250 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700251};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700252struct fuse_open_out {
Tao Baod7db5942015-01-28 10:07:51 -0800253 uint64_t fh;
254 uint32_t open_flags;
255 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700256};
Ben Cheng655a7c02013-10-16 16:09:24 -0700257struct fuse_release_in {
Tao Baod7db5942015-01-28 10:07:51 -0800258 uint64_t fh;
259 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800260 uint32_t release_flags;
261 uint64_t lock_owner;
Ben Cheng655a7c02013-10-16 16:09:24 -0700262};
263struct fuse_flush_in {
Tao Baod7db5942015-01-28 10:07:51 -0800264 uint64_t fh;
265 uint32_t unused;
266 uint32_t padding;
267 uint64_t lock_owner;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700268};
Ben Cheng655a7c02013-10-16 16:09:24 -0700269struct fuse_read_in {
Tao Baod7db5942015-01-28 10:07:51 -0800270 uint64_t fh;
271 uint64_t offset;
Tao Baod7db5942015-01-28 10:07:51 -0800272 uint32_t size;
273 uint32_t read_flags;
274 uint64_t lock_owner;
275 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800276 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700277};
278#define FUSE_COMPAT_WRITE_IN_SIZE 24
279struct fuse_write_in {
Tao Baod7db5942015-01-28 10:07:51 -0800280 uint64_t fh;
281 uint64_t offset;
282 uint32_t size;
283 uint32_t write_flags;
Tao Baod7db5942015-01-28 10:07:51 -0800284 uint64_t lock_owner;
285 uint32_t flags;
286 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700287};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700288struct fuse_write_out {
Tao Baod7db5942015-01-28 10:07:51 -0800289 uint32_t size;
290 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700291};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700292#define FUSE_COMPAT_STATFS_SIZE 48
Ben Cheng655a7c02013-10-16 16:09:24 -0700293struct fuse_statfs_out {
Tao Baod7db5942015-01-28 10:07:51 -0800294 struct fuse_kstatfs st;
Ben Cheng655a7c02013-10-16 16:09:24 -0700295};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700296struct fuse_fsync_in {
Tao Baod7db5942015-01-28 10:07:51 -0800297 uint64_t fh;
298 uint32_t fsync_flags;
299 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700300};
Ben Cheng655a7c02013-10-16 16:09:24 -0700301struct fuse_setxattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800302 uint32_t size;
303 uint32_t flags;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700304};
Ben Cheng655a7c02013-10-16 16:09:24 -0700305struct fuse_getxattr_in {
Tao Baod7db5942015-01-28 10:07:51 -0800306 uint32_t size;
307 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700308};
Ben Cheng655a7c02013-10-16 16:09:24 -0700309struct fuse_getxattr_out {
Tao Baod7db5942015-01-28 10:07:51 -0800310 uint32_t size;
311 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700312};
Ben Cheng655a7c02013-10-16 16:09:24 -0700313struct fuse_lk_in {
Tao Baod7db5942015-01-28 10:07:51 -0800314 uint64_t fh;
315 uint64_t owner;
Tao Baod7db5942015-01-28 10:07:51 -0800316 struct fuse_file_lock lk;
317 uint32_t lk_flags;
318 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700319};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700320struct fuse_lk_out {
Tao Baod7db5942015-01-28 10:07:51 -0800321 struct fuse_file_lock lk;
Ben Cheng655a7c02013-10-16 16:09:24 -0700322};
323struct fuse_access_in {
Tao Baod7db5942015-01-28 10:07:51 -0800324 uint32_t mask;
325 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700326};
327struct fuse_init_in {
Tao Baod7db5942015-01-28 10:07:51 -0800328 uint32_t major;
329 uint32_t minor;
330 uint32_t max_readahead;
331 uint32_t flags;
Ben Cheng655a7c02013-10-16 16:09:24 -0700332};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700333#define FUSE_COMPAT_INIT_OUT_SIZE 8
334#define FUSE_COMPAT_22_INIT_OUT_SIZE 24
Ben Cheng655a7c02013-10-16 16:09:24 -0700335struct fuse_init_out {
Tao Baod7db5942015-01-28 10:07:51 -0800336 uint32_t major;
337 uint32_t minor;
338 uint32_t max_readahead;
339 uint32_t flags;
Tao Baod7db5942015-01-28 10:07:51 -0800340 uint16_t max_background;
341 uint16_t congestion_threshold;
342 uint32_t max_write;
343 uint32_t time_gran;
Tao Baod7db5942015-01-28 10:07:51 -0800344 uint32_t unused[9];
Ben Cheng655a7c02013-10-16 16:09:24 -0700345};
346#define CUSE_INIT_INFO_MAX 4096
347struct cuse_init_in {
Tao Baod7db5942015-01-28 10:07:51 -0800348 uint32_t major;
349 uint32_t minor;
350 uint32_t unused;
351 uint32_t flags;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700352};
Ben Cheng655a7c02013-10-16 16:09:24 -0700353struct cuse_init_out {
Tao Baod7db5942015-01-28 10:07:51 -0800354 uint32_t major;
355 uint32_t minor;
Tao Baod7db5942015-01-28 10:07:51 -0800356 uint32_t unused;
357 uint32_t flags;
358 uint32_t max_read;
359 uint32_t max_write;
Tao Baod7db5942015-01-28 10:07:51 -0800360 uint32_t dev_major;
361 uint32_t dev_minor;
362 uint32_t spare[10];
Ben Cheng655a7c02013-10-16 16:09:24 -0700363};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700364struct fuse_interrupt_in {
Tao Baod7db5942015-01-28 10:07:51 -0800365 uint64_t unique;
Ben Cheng655a7c02013-10-16 16:09:24 -0700366};
367struct fuse_bmap_in {
Tao Baod7db5942015-01-28 10:07:51 -0800368 uint64_t block;
369 uint32_t blocksize;
370 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700371};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700372struct fuse_bmap_out {
Tao Baod7db5942015-01-28 10:07:51 -0800373 uint64_t block;
Ben Cheng655a7c02013-10-16 16:09:24 -0700374};
375struct fuse_ioctl_in {
Tao Baod7db5942015-01-28 10:07:51 -0800376 uint64_t fh;
377 uint32_t flags;
378 uint32_t cmd;
379 uint64_t arg;
Tao Baod7db5942015-01-28 10:07:51 -0800380 uint32_t in_size;
381 uint32_t out_size;
Ben Cheng655a7c02013-10-16 16:09:24 -0700382};
383struct fuse_ioctl_iovec {
Tao Baod7db5942015-01-28 10:07:51 -0800384 uint64_t base;
385 uint64_t len;
Ben Cheng655a7c02013-10-16 16:09:24 -0700386};
387struct fuse_ioctl_out {
Tao Baod7db5942015-01-28 10:07:51 -0800388 int32_t result;
389 uint32_t flags;
390 uint32_t in_iovs;
391 uint32_t out_iovs;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700392};
Ben Cheng655a7c02013-10-16 16:09:24 -0700393struct fuse_poll_in {
Tao Baod7db5942015-01-28 10:07:51 -0800394 uint64_t fh;
395 uint64_t kh;
Tao Baod7db5942015-01-28 10:07:51 -0800396 uint32_t flags;
397 uint32_t events;
Ben Cheng655a7c02013-10-16 16:09:24 -0700398};
399struct fuse_poll_out {
Tao Baod7db5942015-01-28 10:07:51 -0800400 uint32_t revents;
401 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700402};
403struct fuse_notify_poll_wakeup_out {
Tao Baod7db5942015-01-28 10:07:51 -0800404 uint64_t kh;
Ben Cheng655a7c02013-10-16 16:09:24 -0700405};
406struct fuse_fallocate_in {
Tao Baod7db5942015-01-28 10:07:51 -0800407 uint64_t fh;
Tao Baod7db5942015-01-28 10:07:51 -0800408 uint64_t offset;
409 uint64_t length;
410 uint32_t mode;
411 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700412};
Ben Cheng655a7c02013-10-16 16:09:24 -0700413struct fuse_in_header {
Tao Baod7db5942015-01-28 10:07:51 -0800414 uint32_t len;
415 uint32_t opcode;
Tao Baod7db5942015-01-28 10:07:51 -0800416 uint64_t unique;
417 uint64_t nodeid;
418 uint32_t uid;
419 uint32_t gid;
Tao Baod7db5942015-01-28 10:07:51 -0800420 uint32_t pid;
421 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700422};
423struct fuse_out_header {
Tao Baod7db5942015-01-28 10:07:51 -0800424 uint32_t len;
425 int32_t error;
426 uint64_t unique;
Ben Cheng655a7c02013-10-16 16:09:24 -0700427};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700428struct fuse_dirent {
Tao Baod7db5942015-01-28 10:07:51 -0800429 uint64_t ino;
430 uint64_t off;
431 uint32_t namelen;
Tao Baod7db5942015-01-28 10:07:51 -0800432 uint32_t type;
433 char name[];
Ben Cheng655a7c02013-10-16 16:09:24 -0700434};
435#define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
Tao Baod7db5942015-01-28 10:07:51 -0800436#define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(uint64_t) - 1) & ~(sizeof(uint64_t) - 1))
437#define FUSE_DIRENT_SIZE(d) FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
Ben Cheng655a7c02013-10-16 16:09:24 -0700438struct fuse_direntplus {
Tao Baod7db5942015-01-28 10:07:51 -0800439 struct fuse_entry_out entry_out;
Tao Baod7db5942015-01-28 10:07:51 -0800440 struct fuse_dirent dirent;
Ben Cheng655a7c02013-10-16 16:09:24 -0700441};
Tao Baod7db5942015-01-28 10:07:51 -0800442#define FUSE_NAME_OFFSET_DIRENTPLUS offsetof(struct fuse_direntplus, dirent.name)
443#define FUSE_DIRENTPLUS_SIZE(d) FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET_DIRENTPLUS + (d)->dirent.namelen)
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700444struct fuse_notify_inval_inode_out {
Tao Baod7db5942015-01-28 10:07:51 -0800445 uint64_t ino;
446 int64_t off;
447 int64_t len;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700448};
Ben Cheng655a7c02013-10-16 16:09:24 -0700449struct fuse_notify_inval_entry_out {
Tao Baod7db5942015-01-28 10:07:51 -0800450 uint64_t parent;
451 uint32_t namelen;
Tao Baod7db5942015-01-28 10:07:51 -0800452 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700453};
454struct fuse_notify_delete_out {
Tao Baod7db5942015-01-28 10:07:51 -0800455 uint64_t parent;
Tao Baod7db5942015-01-28 10:07:51 -0800456 uint64_t child;
457 uint32_t namelen;
458 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700459};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700460struct fuse_notify_store_out {
Tao Baod7db5942015-01-28 10:07:51 -0800461 uint64_t nodeid;
462 uint64_t offset;
463 uint32_t size;
Tao Baod7db5942015-01-28 10:07:51 -0800464 uint32_t padding;
Ben Cheng655a7c02013-10-16 16:09:24 -0700465};
466struct fuse_notify_retrieve_out {
Tao Baod7db5942015-01-28 10:07:51 -0800467 uint64_t notify_unique;
Tao Baod7db5942015-01-28 10:07:51 -0800468 uint64_t nodeid;
469 uint64_t offset;
470 uint32_t size;
471 uint32_t padding;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700472};
Ben Cheng655a7c02013-10-16 16:09:24 -0700473struct fuse_notify_retrieve_in {
Tao Baod7db5942015-01-28 10:07:51 -0800474 uint64_t dummy1;
475 uint64_t offset;
Tao Baod7db5942015-01-28 10:07:51 -0800476 uint32_t size;
477 uint32_t dummy2;
478 uint64_t dummy3;
479 uint64_t dummy4;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700480};
Christopher Ferris05d08e92016-02-04 13:16:38 -0800481#define FUSE_DEV_IOC_CLONE _IOR(229, 0, uint32_t)
Christopher Ferris106b3a82016-08-24 12:15:38 -0700482struct fuse_lseek_in {
483 uint64_t fh;
484 uint64_t offset;
485 uint32_t whence;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700486 uint32_t padding;
487};
488struct fuse_lseek_out {
489 uint64_t offset;
Christopher Ferris106b3a82016-08-24 12:15:38 -0700490};
Ben Cheng655a7c02013-10-16 16:09:24 -0700491#endif