blob: b3700f0ac2682aedb13577cfb2a1e0dc4d551139 [file] [log] [blame]
Miklos Szeredid8a5ba42005-09-09 13:10:26 -07001/*
2 FUSE: Filesystem in Userspace
Miklos Szeredi1f55ed02008-12-01 19:14:02 +01003 Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu>
Miklos Szeredid8a5ba42005-09-09 13:10:26 -07004
5 This program can be distributed under the terms of the GNU GPL.
6 See the file COPYING.
7*/
8
Miklos Szeredic79e3222007-10-18 03:06:59 -07009/*
10 * This file defines the kernel interface of FUSE
11 *
12 * Protocol changelog:
13 *
14 * 7.9:
15 * - new fuse_getattr_in input argument of GETATTR
Miklos Szeredia9ff4f82007-10-18 03:07:02 -070016 * - add lk_flags in fuse_lk_in
Miklos Szeredif3332112007-10-18 03:07:04 -070017 * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in
Miklos Szeredi0e9663e2007-10-18 03:07:05 -070018 * - add blksize field to fuse_attr
Miklos Szeredia6643092007-11-28 16:22:00 -080019 * - add file flags field to fuse_read_in and fuse_write_in
Tejun Heoa7c1b992008-10-16 16:08:57 +020020 *
21 * 7.10
22 * - add nonseekable open flag
Miklos Szeredi1f55ed02008-12-01 19:14:02 +010023 *
24 * 7.11
25 * - add IOCTL message
26 * - add unsolicited notification support
27 * - add POLL message and NOTIFY_POLL notification
Miklos Szeredie0a43dd2009-06-30 20:12:23 +020028 *
29 * 7.12
30 * - add umask flag to input argument of open, mknod and mkdir
John Muir3b463ae2009-05-31 11:13:57 -040031 * - add notification messages for invalidation of inodes and
32 * directory entries
Csaba Henk7a6d3c82009-07-01 17:28:41 -070033 *
34 * 7.13
35 * - make max number of background requests and congestion threshold
36 * tunables
Miklos Szeredic79e3222007-10-18 03:06:59 -070037 */
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070038
Tejun Heo29d434b2008-10-16 16:08:57 +020039#ifndef _LINUX_FUSE_H
40#define _LINUX_FUSE_H
41
Miklos Szeredi1f55ed02008-12-01 19:14:02 +010042#include <linux/types.h>
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070043
44/** Version number of this interface */
Miklos Szeredi9e6268d2005-09-09 13:10:29 -070045#define FUSE_KERNEL_VERSION 7
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070046
47/** Minor version number of this interface */
Csaba Henk7a6d3c82009-07-01 17:28:41 -070048#define FUSE_KERNEL_MINOR_VERSION 13
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070049
50/** The node ID of the root inode */
51#define FUSE_ROOT_ID 1
52
Miklos Szeredi06663262005-09-09 13:10:32 -070053/* Make sure all structures are padded to 64bit boundary, so 32bit
54 userspace works under 64bit kernels */
55
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070056struct fuse_attr {
57 __u64 ino;
58 __u64 size;
59 __u64 blocks;
60 __u64 atime;
61 __u64 mtime;
62 __u64 ctime;
63 __u32 atimensec;
64 __u32 mtimensec;
65 __u32 ctimensec;
66 __u32 mode;
67 __u32 nlink;
68 __u32 uid;
69 __u32 gid;
70 __u32 rdev;
Miklos Szeredi0e9663e2007-10-18 03:07:05 -070071 __u32 blksize;
72 __u32 padding;
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070073};
74
Miklos Szeredie5e55582005-09-09 13:10:28 -070075struct fuse_kstatfs {
76 __u64 blocks;
77 __u64 bfree;
78 __u64 bavail;
79 __u64 files;
80 __u64 ffree;
81 __u32 bsize;
82 __u32 namelen;
Miklos Szeredide5f1202006-01-06 00:19:37 -080083 __u32 frsize;
84 __u32 padding;
85 __u32 spare[6];
Miklos Szeredie5e55582005-09-09 13:10:28 -070086};
87
Miklos Szeredi71421252006-06-25 05:48:52 -070088struct fuse_file_lock {
89 __u64 start;
90 __u64 end;
91 __u32 type;
92 __u32 pid; /* tgid */
93};
94
Miklos Szeredi9cd68452006-02-01 03:04:40 -080095/**
96 * Bitmasks for fuse_setattr_in.valid
97 */
Miklos Szeredi9e6268d2005-09-09 13:10:29 -070098#define FATTR_MODE (1 << 0)
99#define FATTR_UID (1 << 1)
100#define FATTR_GID (1 << 2)
101#define FATTR_SIZE (1 << 3)
102#define FATTR_ATIME (1 << 4)
103#define FATTR_MTIME (1 << 5)
Miklos Szeredibefc6492005-11-07 00:59:52 -0800104#define FATTR_FH (1 << 6)
Miklos Szeredi17637cb2007-10-18 03:07:01 -0700105#define FATTR_ATIME_NOW (1 << 7)
106#define FATTR_MTIME_NOW (1 << 8)
Miklos Szeredif3332112007-10-18 03:07:04 -0700107#define FATTR_LOCKOWNER (1 << 9)
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700108
Miklos Szeredi45323fb2005-09-09 13:10:37 -0700109/**
110 * Flags returned by the OPEN request
111 *
112 * FOPEN_DIRECT_IO: bypass page cache for this open file
113 * FOPEN_KEEP_CACHE: don't invalidate the data cache on open
Tejun Heoa7c1b992008-10-16 16:08:57 +0200114 * FOPEN_NONSEEKABLE: the file is not seekable
Miklos Szeredi45323fb2005-09-09 13:10:37 -0700115 */
116#define FOPEN_DIRECT_IO (1 << 0)
117#define FOPEN_KEEP_CACHE (1 << 1)
Tejun Heoa7c1b992008-10-16 16:08:57 +0200118#define FOPEN_NONSEEKABLE (1 << 2)
Miklos Szeredi45323fb2005-09-09 13:10:37 -0700119
Miklos Szeredi9cd68452006-02-01 03:04:40 -0800120/**
121 * INIT request/reply flags
Miklos Szeredi33670fa2008-07-25 01:49:02 -0700122 *
123 * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".."
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200124 * FUSE_DONT_MASK: don't apply umask to file mode on create operations
Miklos Szeredi9cd68452006-02-01 03:04:40 -0800125 */
126#define FUSE_ASYNC_READ (1 << 0)
Miklos Szeredi71421252006-06-25 05:48:52 -0700127#define FUSE_POSIX_LOCKS (1 << 1)
Miklos Szeredic79e3222007-10-18 03:06:59 -0700128#define FUSE_FILE_OPS (1 << 2)
Miklos Szeredi6ff958e2007-10-18 03:07:02 -0700129#define FUSE_ATOMIC_O_TRUNC (1 << 3)
Miklos Szeredi33670fa2008-07-25 01:49:02 -0700130#define FUSE_EXPORT_SUPPORT (1 << 4)
Miklos Szeredi78bb6cb2008-05-12 14:02:32 -0700131#define FUSE_BIG_WRITES (1 << 5)
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200132#define FUSE_DONT_MASK (1 << 6)
Miklos Szeredi9cd68452006-02-01 03:04:40 -0800133
Miklos Szeredie9168c12006-12-06 20:35:38 -0800134/**
Tejun Heo151060a2009-04-14 10:54:54 +0900135 * CUSE INIT request/reply flags
136 *
137 * CUSE_UNRESTRICTED_IOCTL: use unrestricted ioctl
138 */
139#define CUSE_UNRESTRICTED_IOCTL (1 << 0)
140
141/**
Miklos Szeredie9168c12006-12-06 20:35:38 -0800142 * Release flags
143 */
144#define FUSE_RELEASE_FLUSH (1 << 0)
145
Miklos Szeredic79e3222007-10-18 03:06:59 -0700146/**
147 * Getattr flags
148 */
149#define FUSE_GETATTR_FH (1 << 0)
150
Miklos Szeredia9ff4f82007-10-18 03:07:02 -0700151/**
152 * Lock flags
153 */
154#define FUSE_LK_FLOCK (1 << 0)
155
Miklos Szeredib25e82e2007-10-18 03:07:03 -0700156/**
157 * WRITE flags
158 *
159 * FUSE_WRITE_CACHE: delayed write from page cache, file handle is guessed
Miklos Szeredif3332112007-10-18 03:07:04 -0700160 * FUSE_WRITE_LOCKOWNER: lock_owner field is valid
Miklos Szeredib25e82e2007-10-18 03:07:03 -0700161 */
162#define FUSE_WRITE_CACHE (1 << 0)
Miklos Szeredif3332112007-10-18 03:07:04 -0700163#define FUSE_WRITE_LOCKOWNER (1 << 1)
164
165/**
166 * Read flags
167 */
168#define FUSE_READ_LOCKOWNER (1 << 1)
Miklos Szeredib25e82e2007-10-18 03:07:03 -0700169
Tejun Heo59efec72008-11-26 12:03:55 +0100170/**
171 * Ioctl flags
172 *
173 * FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine
174 * FUSE_IOCTL_UNRESTRICTED: not restricted to well-formed ioctls, retry allowed
175 * FUSE_IOCTL_RETRY: retry with new iovecs
176 *
177 * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs
178 */
179#define FUSE_IOCTL_COMPAT (1 << 0)
180#define FUSE_IOCTL_UNRESTRICTED (1 << 1)
181#define FUSE_IOCTL_RETRY (1 << 2)
182
183#define FUSE_IOCTL_MAX_IOV 256
184
Tejun Heo95668a62008-11-26 12:03:55 +0100185/**
186 * Poll flags
187 *
188 * FUSE_POLL_SCHEDULE_NOTIFY: request poll notify
189 */
190#define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)
191
Miklos Szeredi334f4852005-09-09 13:10:27 -0700192enum fuse_opcode {
Miklos Szeredie5e55582005-09-09 13:10:28 -0700193 FUSE_LOOKUP = 1,
194 FUSE_FORGET = 2, /* no reply */
195 FUSE_GETATTR = 3,
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700196 FUSE_SETATTR = 4,
Miklos Szeredie5e55582005-09-09 13:10:28 -0700197 FUSE_READLINK = 5,
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700198 FUSE_SYMLINK = 6,
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700199 FUSE_MKNOD = 8,
200 FUSE_MKDIR = 9,
201 FUSE_UNLINK = 10,
202 FUSE_RMDIR = 11,
203 FUSE_RENAME = 12,
204 FUSE_LINK = 13,
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700205 FUSE_OPEN = 14,
206 FUSE_READ = 15,
207 FUSE_WRITE = 16,
Miklos Szeredie5e55582005-09-09 13:10:28 -0700208 FUSE_STATFS = 17,
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700209 FUSE_RELEASE = 18,
210 FUSE_FSYNC = 20,
Miklos Szeredi92a87802005-09-09 13:10:31 -0700211 FUSE_SETXATTR = 21,
212 FUSE_GETXATTR = 22,
213 FUSE_LISTXATTR = 23,
214 FUSE_REMOVEXATTR = 24,
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700215 FUSE_FLUSH = 25,
Miklos Szeredi04730fe2005-09-09 13:10:36 -0700216 FUSE_INIT = 26,
217 FUSE_OPENDIR = 27,
218 FUSE_READDIR = 28,
Miklos Szeredi82547982005-09-09 13:10:38 -0700219 FUSE_RELEASEDIR = 29,
Miklos Szeredi31d40d72005-11-07 00:59:50 -0800220 FUSE_FSYNCDIR = 30,
Miklos Szeredi71421252006-06-25 05:48:52 -0700221 FUSE_GETLK = 31,
222 FUSE_SETLK = 32,
223 FUSE_SETLKW = 33,
Miklos Szeredifd72faa2005-11-07 00:59:51 -0800224 FUSE_ACCESS = 34,
Miklos Szeredia4d27e72006-06-25 05:48:54 -0700225 FUSE_CREATE = 35,
226 FUSE_INTERRUPT = 36,
Miklos Szeredib2d22722006-12-06 20:35:51 -0800227 FUSE_BMAP = 37,
Miklos Szeredi0ec7ca42006-12-06 20:35:52 -0800228 FUSE_DESTROY = 38,
Tejun Heo59efec72008-11-26 12:03:55 +0100229 FUSE_IOCTL = 39,
Tejun Heo95668a62008-11-26 12:03:55 +0100230 FUSE_POLL = 40,
Tejun Heo151060a2009-04-14 10:54:54 +0900231
232 /* CUSE specific operations */
233 CUSE_INIT = 4096,
Miklos Szeredi334f4852005-09-09 13:10:27 -0700234};
235
Tejun Heo85993962008-11-26 12:03:55 +0100236enum fuse_notify_code {
Tejun Heo95668a62008-11-26 12:03:55 +0100237 FUSE_NOTIFY_POLL = 1,
John Muir3b463ae2009-05-31 11:13:57 -0400238 FUSE_NOTIFY_INVAL_INODE = 2,
239 FUSE_NOTIFY_INVAL_ENTRY = 3,
Tejun Heo85993962008-11-26 12:03:55 +0100240 FUSE_NOTIFY_CODE_MAX,
241};
242
Miklos Szeredi1d3d7522006-01-06 00:19:40 -0800243/* The read buffer is required to be at least 8k, but may be much larger */
244#define FUSE_MIN_READ_BUFFER 8192
Miklos Szeredie5e55582005-09-09 13:10:28 -0700245
Miklos Szeredi0e9663e2007-10-18 03:07:05 -0700246#define FUSE_COMPAT_ENTRY_OUT_SIZE 120
247
Miklos Szeredie5e55582005-09-09 13:10:28 -0700248struct fuse_entry_out {
249 __u64 nodeid; /* Inode ID */
250 __u64 generation; /* Inode generation: nodeid:gen must
251 be unique for the fs's lifetime */
252 __u64 entry_valid; /* Cache timeout for the name */
253 __u64 attr_valid; /* Cache timeout for the attributes */
254 __u32 entry_valid_nsec;
255 __u32 attr_valid_nsec;
256 struct fuse_attr attr;
257};
258
259struct fuse_forget_in {
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700260 __u64 nlookup;
Miklos Szeredie5e55582005-09-09 13:10:28 -0700261};
262
Miklos Szeredic79e3222007-10-18 03:06:59 -0700263struct fuse_getattr_in {
264 __u32 getattr_flags;
265 __u32 dummy;
266 __u64 fh;
267};
268
Miklos Szeredi0e9663e2007-10-18 03:07:05 -0700269#define FUSE_COMPAT_ATTR_OUT_SIZE 96
270
Miklos Szeredie5e55582005-09-09 13:10:28 -0700271struct fuse_attr_out {
272 __u64 attr_valid; /* Cache timeout for the attributes */
273 __u32 attr_valid_nsec;
274 __u32 dummy;
275 struct fuse_attr attr;
276};
277
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200278#define FUSE_COMPAT_MKNOD_IN_SIZE 8
279
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700280struct fuse_mknod_in {
281 __u32 mode;
282 __u32 rdev;
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200283 __u32 umask;
284 __u32 padding;
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700285};
286
287struct fuse_mkdir_in {
288 __u32 mode;
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200289 __u32 umask;
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700290};
291
292struct fuse_rename_in {
293 __u64 newdir;
294};
295
296struct fuse_link_in {
297 __u64 oldnodeid;
298};
299
300struct fuse_setattr_in {
301 __u32 valid;
Miklos Szeredi06663262005-09-09 13:10:32 -0700302 __u32 padding;
Miklos Szeredibefc6492005-11-07 00:59:52 -0800303 __u64 fh;
304 __u64 size;
Miklos Szeredif3332112007-10-18 03:07:04 -0700305 __u64 lock_owner;
Miklos Szeredibefc6492005-11-07 00:59:52 -0800306 __u64 atime;
307 __u64 mtime;
308 __u64 unused2;
309 __u32 atimensec;
310 __u32 mtimensec;
311 __u32 unused3;
312 __u32 mode;
313 __u32 unused4;
314 __u32 uid;
315 __u32 gid;
316 __u32 unused5;
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700317};
318
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700319struct fuse_open_in {
320 __u32 flags;
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200321 __u32 unused;
322};
323
324struct fuse_create_in {
325 __u32 flags;
Miklos Szeredifd72faa2005-11-07 00:59:51 -0800326 __u32 mode;
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200327 __u32 umask;
328 __u32 padding;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700329};
330
331struct fuse_open_out {
332 __u64 fh;
333 __u32 open_flags;
Miklos Szeredi06663262005-09-09 13:10:32 -0700334 __u32 padding;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700335};
336
337struct fuse_release_in {
338 __u64 fh;
339 __u32 flags;
Miklos Szeredie9168c12006-12-06 20:35:38 -0800340 __u32 release_flags;
341 __u64 lock_owner;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700342};
343
344struct fuse_flush_in {
345 __u64 fh;
Miklos Szeredie9168c12006-12-06 20:35:38 -0800346 __u32 unused;
Miklos Szeredi06663262005-09-09 13:10:32 -0700347 __u32 padding;
Miklos Szeredi71421252006-06-25 05:48:52 -0700348 __u64 lock_owner;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700349};
350
351struct fuse_read_in {
352 __u64 fh;
353 __u64 offset;
354 __u32 size;
Miklos Szeredif3332112007-10-18 03:07:04 -0700355 __u32 read_flags;
356 __u64 lock_owner;
Miklos Szeredia6643092007-11-28 16:22:00 -0800357 __u32 flags;
358 __u32 padding;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700359};
360
Miklos Szeredif3332112007-10-18 03:07:04 -0700361#define FUSE_COMPAT_WRITE_IN_SIZE 24
362
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700363struct fuse_write_in {
364 __u64 fh;
365 __u64 offset;
366 __u32 size;
367 __u32 write_flags;
Miklos Szeredif3332112007-10-18 03:07:04 -0700368 __u64 lock_owner;
Miklos Szeredia6643092007-11-28 16:22:00 -0800369 __u32 flags;
370 __u32 padding;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700371};
372
373struct fuse_write_out {
374 __u32 size;
Miklos Szeredi06663262005-09-09 13:10:32 -0700375 __u32 padding;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700376};
377
Miklos Szeredide5f1202006-01-06 00:19:37 -0800378#define FUSE_COMPAT_STATFS_SIZE 48
379
Miklos Szeredie5e55582005-09-09 13:10:28 -0700380struct fuse_statfs_out {
381 struct fuse_kstatfs st;
382};
383
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700384struct fuse_fsync_in {
385 __u64 fh;
386 __u32 fsync_flags;
Miklos Szeredi06663262005-09-09 13:10:32 -0700387 __u32 padding;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700388};
389
Miklos Szeredi92a87802005-09-09 13:10:31 -0700390struct fuse_setxattr_in {
391 __u32 size;
392 __u32 flags;
393};
394
395struct fuse_getxattr_in {
396 __u32 size;
Miklos Szeredi06663262005-09-09 13:10:32 -0700397 __u32 padding;
Miklos Szeredi92a87802005-09-09 13:10:31 -0700398};
399
400struct fuse_getxattr_out {
401 __u32 size;
Miklos Szeredi06663262005-09-09 13:10:32 -0700402 __u32 padding;
Miklos Szeredi92a87802005-09-09 13:10:31 -0700403};
404
Miklos Szeredi71421252006-06-25 05:48:52 -0700405struct fuse_lk_in {
406 __u64 fh;
407 __u64 owner;
408 struct fuse_file_lock lk;
Miklos Szeredia9ff4f82007-10-18 03:07:02 -0700409 __u32 lk_flags;
410 __u32 padding;
Miklos Szeredi71421252006-06-25 05:48:52 -0700411};
412
413struct fuse_lk_out {
414 struct fuse_file_lock lk;
415};
416
Miklos Szeredi31d40d72005-11-07 00:59:50 -0800417struct fuse_access_in {
418 __u32 mask;
419 __u32 padding;
420};
421
Miklos Szeredi3ec870d2006-01-06 00:19:41 -0800422struct fuse_init_in {
Miklos Szeredi334f4852005-09-09 13:10:27 -0700423 __u32 major;
424 __u32 minor;
Miklos Szeredi9cd68452006-02-01 03:04:40 -0800425 __u32 max_readahead;
426 __u32 flags;
Miklos Szeredi334f4852005-09-09 13:10:27 -0700427};
428
Miklos Szeredi3ec870d2006-01-06 00:19:41 -0800429struct fuse_init_out {
430 __u32 major;
431 __u32 minor;
Miklos Szeredi9cd68452006-02-01 03:04:40 -0800432 __u32 max_readahead;
433 __u32 flags;
Csaba Henk7a6d3c82009-07-01 17:28:41 -0700434 __u16 max_background;
435 __u16 congestion_threshold;
Miklos Szeredi3ec870d2006-01-06 00:19:41 -0800436 __u32 max_write;
437};
438
Tejun Heo151060a2009-04-14 10:54:54 +0900439#define CUSE_INIT_INFO_MAX 4096
440
441struct cuse_init_in {
442 __u32 major;
443 __u32 minor;
444 __u32 unused;
445 __u32 flags;
446};
447
448struct cuse_init_out {
449 __u32 major;
450 __u32 minor;
451 __u32 unused;
452 __u32 flags;
453 __u32 max_read;
454 __u32 max_write;
455 __u32 dev_major; /* chardev major */
456 __u32 dev_minor; /* chardev minor */
457 __u32 spare[10];
458};
459
Miklos Szeredia4d27e72006-06-25 05:48:54 -0700460struct fuse_interrupt_in {
461 __u64 unique;
462};
463
Miklos Szeredib2d22722006-12-06 20:35:51 -0800464struct fuse_bmap_in {
465 __u64 block;
466 __u32 blocksize;
467 __u32 padding;
468};
469
470struct fuse_bmap_out {
471 __u64 block;
472};
473
Tejun Heo59efec72008-11-26 12:03:55 +0100474struct fuse_ioctl_in {
475 __u64 fh;
476 __u32 flags;
477 __u32 cmd;
478 __u64 arg;
479 __u32 in_size;
480 __u32 out_size;
481};
482
483struct fuse_ioctl_out {
484 __s32 result;
485 __u32 flags;
486 __u32 in_iovs;
487 __u32 out_iovs;
488};
489
Tejun Heo95668a62008-11-26 12:03:55 +0100490struct fuse_poll_in {
491 __u64 fh;
492 __u64 kh;
493 __u32 flags;
494 __u32 padding;
495};
496
497struct fuse_poll_out {
498 __u32 revents;
499 __u32 padding;
500};
501
502struct fuse_notify_poll_wakeup_out {
503 __u64 kh;
504};
505
Miklos Szeredi334f4852005-09-09 13:10:27 -0700506struct fuse_in_header {
507 __u32 len;
508 __u32 opcode;
509 __u64 unique;
510 __u64 nodeid;
511 __u32 uid;
512 __u32 gid;
513 __u32 pid;
Miklos Szeredi06663262005-09-09 13:10:32 -0700514 __u32 padding;
Miklos Szeredi334f4852005-09-09 13:10:27 -0700515};
516
517struct fuse_out_header {
518 __u32 len;
519 __s32 error;
520 __u64 unique;
521};
522
Miklos Szeredie5e55582005-09-09 13:10:28 -0700523struct fuse_dirent {
524 __u64 ino;
525 __u64 off;
526 __u32 namelen;
527 __u32 type;
528 char name[0];
529};
530
Andrew Morton21f3da92007-07-15 23:39:50 -0700531#define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
Miklos Szeredie5e55582005-09-09 13:10:28 -0700532#define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1))
533#define FUSE_DIRENT_SIZE(d) \
534 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
Tejun Heo29d434b2008-10-16 16:08:57 +0200535
John Muir3b463ae2009-05-31 11:13:57 -0400536struct fuse_notify_inval_inode_out {
537 __u64 ino;
538 __s64 off;
539 __s64 len;
540};
541
542struct fuse_notify_inval_entry_out {
543 __u64 parent;
544 __u32 namelen;
545 __u32 padding;
546};
547
Tejun Heo29d434b2008-10-16 16:08:57 +0200548#endif /* _LINUX_FUSE_H */