blob: cf593bf9fd3253a3fbc2ae963ff95f1b3a5c3ccf [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
Miklos Szeredic79e3222007-10-18 03:06:59 -070033 */
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070034
Tejun Heo29d434b2008-10-16 16:08:57 +020035#ifndef _LINUX_FUSE_H
36#define _LINUX_FUSE_H
37
Miklos Szeredi1f55ed02008-12-01 19:14:02 +010038#include <linux/types.h>
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070039
40/** Version number of this interface */
Miklos Szeredi9e6268d2005-09-09 13:10:29 -070041#define FUSE_KERNEL_VERSION 7
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070042
43/** Minor version number of this interface */
Miklos Szeredie0a43dd2009-06-30 20:12:23 +020044#define FUSE_KERNEL_MINOR_VERSION 12
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070045
46/** The node ID of the root inode */
47#define FUSE_ROOT_ID 1
48
Miklos Szeredi06663262005-09-09 13:10:32 -070049/* Make sure all structures are padded to 64bit boundary, so 32bit
50 userspace works under 64bit kernels */
51
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070052struct fuse_attr {
53 __u64 ino;
54 __u64 size;
55 __u64 blocks;
56 __u64 atime;
57 __u64 mtime;
58 __u64 ctime;
59 __u32 atimensec;
60 __u32 mtimensec;
61 __u32 ctimensec;
62 __u32 mode;
63 __u32 nlink;
64 __u32 uid;
65 __u32 gid;
66 __u32 rdev;
Miklos Szeredi0e9663e2007-10-18 03:07:05 -070067 __u32 blksize;
68 __u32 padding;
Miklos Szeredid8a5ba42005-09-09 13:10:26 -070069};
70
Miklos Szeredie5e55582005-09-09 13:10:28 -070071struct fuse_kstatfs {
72 __u64 blocks;
73 __u64 bfree;
74 __u64 bavail;
75 __u64 files;
76 __u64 ffree;
77 __u32 bsize;
78 __u32 namelen;
Miklos Szeredide5f1202006-01-06 00:19:37 -080079 __u32 frsize;
80 __u32 padding;
81 __u32 spare[6];
Miklos Szeredie5e55582005-09-09 13:10:28 -070082};
83
Miklos Szeredi71421252006-06-25 05:48:52 -070084struct fuse_file_lock {
85 __u64 start;
86 __u64 end;
87 __u32 type;
88 __u32 pid; /* tgid */
89};
90
Miklos Szeredi9cd68452006-02-01 03:04:40 -080091/**
92 * Bitmasks for fuse_setattr_in.valid
93 */
Miklos Szeredi9e6268d2005-09-09 13:10:29 -070094#define FATTR_MODE (1 << 0)
95#define FATTR_UID (1 << 1)
96#define FATTR_GID (1 << 2)
97#define FATTR_SIZE (1 << 3)
98#define FATTR_ATIME (1 << 4)
99#define FATTR_MTIME (1 << 5)
Miklos Szeredibefc6492005-11-07 00:59:52 -0800100#define FATTR_FH (1 << 6)
Miklos Szeredi17637cb2007-10-18 03:07:01 -0700101#define FATTR_ATIME_NOW (1 << 7)
102#define FATTR_MTIME_NOW (1 << 8)
Miklos Szeredif3332112007-10-18 03:07:04 -0700103#define FATTR_LOCKOWNER (1 << 9)
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700104
Miklos Szeredi45323fb2005-09-09 13:10:37 -0700105/**
106 * Flags returned by the OPEN request
107 *
108 * FOPEN_DIRECT_IO: bypass page cache for this open file
109 * FOPEN_KEEP_CACHE: don't invalidate the data cache on open
Tejun Heoa7c1b992008-10-16 16:08:57 +0200110 * FOPEN_NONSEEKABLE: the file is not seekable
Miklos Szeredi45323fb2005-09-09 13:10:37 -0700111 */
112#define FOPEN_DIRECT_IO (1 << 0)
113#define FOPEN_KEEP_CACHE (1 << 1)
Tejun Heoa7c1b992008-10-16 16:08:57 +0200114#define FOPEN_NONSEEKABLE (1 << 2)
Miklos Szeredi45323fb2005-09-09 13:10:37 -0700115
Miklos Szeredi9cd68452006-02-01 03:04:40 -0800116/**
117 * INIT request/reply flags
Miklos Szeredi33670fa2008-07-25 01:49:02 -0700118 *
119 * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".."
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200120 * FUSE_DONT_MASK: don't apply umask to file mode on create operations
Miklos Szeredi9cd68452006-02-01 03:04:40 -0800121 */
122#define FUSE_ASYNC_READ (1 << 0)
Miklos Szeredi71421252006-06-25 05:48:52 -0700123#define FUSE_POSIX_LOCKS (1 << 1)
Miklos Szeredic79e3222007-10-18 03:06:59 -0700124#define FUSE_FILE_OPS (1 << 2)
Miklos Szeredi6ff958e2007-10-18 03:07:02 -0700125#define FUSE_ATOMIC_O_TRUNC (1 << 3)
Miklos Szeredi33670fa2008-07-25 01:49:02 -0700126#define FUSE_EXPORT_SUPPORT (1 << 4)
Miklos Szeredi78bb6cb2008-05-12 14:02:32 -0700127#define FUSE_BIG_WRITES (1 << 5)
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200128#define FUSE_DONT_MASK (1 << 6)
Miklos Szeredi9cd68452006-02-01 03:04:40 -0800129
Miklos Szeredie9168c12006-12-06 20:35:38 -0800130/**
Tejun Heo151060a2009-04-14 10:54:54 +0900131 * CUSE INIT request/reply flags
132 *
133 * CUSE_UNRESTRICTED_IOCTL: use unrestricted ioctl
134 */
135#define CUSE_UNRESTRICTED_IOCTL (1 << 0)
136
137/**
Miklos Szeredie9168c12006-12-06 20:35:38 -0800138 * Release flags
139 */
140#define FUSE_RELEASE_FLUSH (1 << 0)
141
Miklos Szeredic79e3222007-10-18 03:06:59 -0700142/**
143 * Getattr flags
144 */
145#define FUSE_GETATTR_FH (1 << 0)
146
Miklos Szeredia9ff4f82007-10-18 03:07:02 -0700147/**
148 * Lock flags
149 */
150#define FUSE_LK_FLOCK (1 << 0)
151
Miklos Szeredib25e82e2007-10-18 03:07:03 -0700152/**
153 * WRITE flags
154 *
155 * FUSE_WRITE_CACHE: delayed write from page cache, file handle is guessed
Miklos Szeredif3332112007-10-18 03:07:04 -0700156 * FUSE_WRITE_LOCKOWNER: lock_owner field is valid
Miklos Szeredib25e82e2007-10-18 03:07:03 -0700157 */
158#define FUSE_WRITE_CACHE (1 << 0)
Miklos Szeredif3332112007-10-18 03:07:04 -0700159#define FUSE_WRITE_LOCKOWNER (1 << 1)
160
161/**
162 * Read flags
163 */
164#define FUSE_READ_LOCKOWNER (1 << 1)
Miklos Szeredib25e82e2007-10-18 03:07:03 -0700165
Tejun Heo59efec72008-11-26 12:03:55 +0100166/**
167 * Ioctl flags
168 *
169 * FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine
170 * FUSE_IOCTL_UNRESTRICTED: not restricted to well-formed ioctls, retry allowed
171 * FUSE_IOCTL_RETRY: retry with new iovecs
172 *
173 * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs
174 */
175#define FUSE_IOCTL_COMPAT (1 << 0)
176#define FUSE_IOCTL_UNRESTRICTED (1 << 1)
177#define FUSE_IOCTL_RETRY (1 << 2)
178
179#define FUSE_IOCTL_MAX_IOV 256
180
Tejun Heo95668a62008-11-26 12:03:55 +0100181/**
182 * Poll flags
183 *
184 * FUSE_POLL_SCHEDULE_NOTIFY: request poll notify
185 */
186#define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)
187
Miklos Szeredi334f4852005-09-09 13:10:27 -0700188enum fuse_opcode {
Miklos Szeredie5e55582005-09-09 13:10:28 -0700189 FUSE_LOOKUP = 1,
190 FUSE_FORGET = 2, /* no reply */
191 FUSE_GETATTR = 3,
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700192 FUSE_SETATTR = 4,
Miklos Szeredie5e55582005-09-09 13:10:28 -0700193 FUSE_READLINK = 5,
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700194 FUSE_SYMLINK = 6,
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700195 FUSE_MKNOD = 8,
196 FUSE_MKDIR = 9,
197 FUSE_UNLINK = 10,
198 FUSE_RMDIR = 11,
199 FUSE_RENAME = 12,
200 FUSE_LINK = 13,
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700201 FUSE_OPEN = 14,
202 FUSE_READ = 15,
203 FUSE_WRITE = 16,
Miklos Szeredie5e55582005-09-09 13:10:28 -0700204 FUSE_STATFS = 17,
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700205 FUSE_RELEASE = 18,
206 FUSE_FSYNC = 20,
Miklos Szeredi92a87802005-09-09 13:10:31 -0700207 FUSE_SETXATTR = 21,
208 FUSE_GETXATTR = 22,
209 FUSE_LISTXATTR = 23,
210 FUSE_REMOVEXATTR = 24,
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700211 FUSE_FLUSH = 25,
Miklos Szeredi04730fe2005-09-09 13:10:36 -0700212 FUSE_INIT = 26,
213 FUSE_OPENDIR = 27,
214 FUSE_READDIR = 28,
Miklos Szeredi82547982005-09-09 13:10:38 -0700215 FUSE_RELEASEDIR = 29,
Miklos Szeredi31d40d72005-11-07 00:59:50 -0800216 FUSE_FSYNCDIR = 30,
Miklos Szeredi71421252006-06-25 05:48:52 -0700217 FUSE_GETLK = 31,
218 FUSE_SETLK = 32,
219 FUSE_SETLKW = 33,
Miklos Szeredifd72faa2005-11-07 00:59:51 -0800220 FUSE_ACCESS = 34,
Miklos Szeredia4d27e72006-06-25 05:48:54 -0700221 FUSE_CREATE = 35,
222 FUSE_INTERRUPT = 36,
Miklos Szeredib2d22722006-12-06 20:35:51 -0800223 FUSE_BMAP = 37,
Miklos Szeredi0ec7ca42006-12-06 20:35:52 -0800224 FUSE_DESTROY = 38,
Tejun Heo59efec72008-11-26 12:03:55 +0100225 FUSE_IOCTL = 39,
Tejun Heo95668a62008-11-26 12:03:55 +0100226 FUSE_POLL = 40,
Tejun Heo151060a2009-04-14 10:54:54 +0900227
228 /* CUSE specific operations */
229 CUSE_INIT = 4096,
Miklos Szeredi334f4852005-09-09 13:10:27 -0700230};
231
Tejun Heo85993962008-11-26 12:03:55 +0100232enum fuse_notify_code {
Tejun Heo95668a62008-11-26 12:03:55 +0100233 FUSE_NOTIFY_POLL = 1,
John Muir3b463ae2009-05-31 11:13:57 -0400234 FUSE_NOTIFY_INVAL_INODE = 2,
235 FUSE_NOTIFY_INVAL_ENTRY = 3,
Tejun Heo85993962008-11-26 12:03:55 +0100236 FUSE_NOTIFY_CODE_MAX,
237};
238
Miklos Szeredi1d3d7522006-01-06 00:19:40 -0800239/* The read buffer is required to be at least 8k, but may be much larger */
240#define FUSE_MIN_READ_BUFFER 8192
Miklos Szeredie5e55582005-09-09 13:10:28 -0700241
Miklos Szeredi0e9663e2007-10-18 03:07:05 -0700242#define FUSE_COMPAT_ENTRY_OUT_SIZE 120
243
Miklos Szeredie5e55582005-09-09 13:10:28 -0700244struct fuse_entry_out {
245 __u64 nodeid; /* Inode ID */
246 __u64 generation; /* Inode generation: nodeid:gen must
247 be unique for the fs's lifetime */
248 __u64 entry_valid; /* Cache timeout for the name */
249 __u64 attr_valid; /* Cache timeout for the attributes */
250 __u32 entry_valid_nsec;
251 __u32 attr_valid_nsec;
252 struct fuse_attr attr;
253};
254
255struct fuse_forget_in {
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700256 __u64 nlookup;
Miklos Szeredie5e55582005-09-09 13:10:28 -0700257};
258
Miklos Szeredic79e3222007-10-18 03:06:59 -0700259struct fuse_getattr_in {
260 __u32 getattr_flags;
261 __u32 dummy;
262 __u64 fh;
263};
264
Miklos Szeredi0e9663e2007-10-18 03:07:05 -0700265#define FUSE_COMPAT_ATTR_OUT_SIZE 96
266
Miklos Szeredie5e55582005-09-09 13:10:28 -0700267struct fuse_attr_out {
268 __u64 attr_valid; /* Cache timeout for the attributes */
269 __u32 attr_valid_nsec;
270 __u32 dummy;
271 struct fuse_attr attr;
272};
273
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200274#define FUSE_COMPAT_MKNOD_IN_SIZE 8
275
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700276struct fuse_mknod_in {
277 __u32 mode;
278 __u32 rdev;
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200279 __u32 umask;
280 __u32 padding;
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700281};
282
283struct fuse_mkdir_in {
284 __u32 mode;
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200285 __u32 umask;
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700286};
287
288struct fuse_rename_in {
289 __u64 newdir;
290};
291
292struct fuse_link_in {
293 __u64 oldnodeid;
294};
295
296struct fuse_setattr_in {
297 __u32 valid;
Miklos Szeredi06663262005-09-09 13:10:32 -0700298 __u32 padding;
Miklos Szeredibefc6492005-11-07 00:59:52 -0800299 __u64 fh;
300 __u64 size;
Miklos Szeredif3332112007-10-18 03:07:04 -0700301 __u64 lock_owner;
Miklos Szeredibefc6492005-11-07 00:59:52 -0800302 __u64 atime;
303 __u64 mtime;
304 __u64 unused2;
305 __u32 atimensec;
306 __u32 mtimensec;
307 __u32 unused3;
308 __u32 mode;
309 __u32 unused4;
310 __u32 uid;
311 __u32 gid;
312 __u32 unused5;
Miklos Szeredi9e6268d2005-09-09 13:10:29 -0700313};
314
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700315struct fuse_open_in {
316 __u32 flags;
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200317 __u32 unused;
318};
319
320struct fuse_create_in {
321 __u32 flags;
Miklos Szeredifd72faa2005-11-07 00:59:51 -0800322 __u32 mode;
Miklos Szeredie0a43dd2009-06-30 20:12:23 +0200323 __u32 umask;
324 __u32 padding;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700325};
326
327struct fuse_open_out {
328 __u64 fh;
329 __u32 open_flags;
Miklos Szeredi06663262005-09-09 13:10:32 -0700330 __u32 padding;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700331};
332
333struct fuse_release_in {
334 __u64 fh;
335 __u32 flags;
Miklos Szeredie9168c12006-12-06 20:35:38 -0800336 __u32 release_flags;
337 __u64 lock_owner;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700338};
339
340struct fuse_flush_in {
341 __u64 fh;
Miklos Szeredie9168c12006-12-06 20:35:38 -0800342 __u32 unused;
Miklos Szeredi06663262005-09-09 13:10:32 -0700343 __u32 padding;
Miklos Szeredi71421252006-06-25 05:48:52 -0700344 __u64 lock_owner;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700345};
346
347struct fuse_read_in {
348 __u64 fh;
349 __u64 offset;
350 __u32 size;
Miklos Szeredif3332112007-10-18 03:07:04 -0700351 __u32 read_flags;
352 __u64 lock_owner;
Miklos Szeredia6643092007-11-28 16:22:00 -0800353 __u32 flags;
354 __u32 padding;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700355};
356
Miklos Szeredif3332112007-10-18 03:07:04 -0700357#define FUSE_COMPAT_WRITE_IN_SIZE 24
358
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700359struct fuse_write_in {
360 __u64 fh;
361 __u64 offset;
362 __u32 size;
363 __u32 write_flags;
Miklos Szeredif3332112007-10-18 03:07:04 -0700364 __u64 lock_owner;
Miklos Szeredia6643092007-11-28 16:22:00 -0800365 __u32 flags;
366 __u32 padding;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700367};
368
369struct fuse_write_out {
370 __u32 size;
Miklos Szeredi06663262005-09-09 13:10:32 -0700371 __u32 padding;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700372};
373
Miklos Szeredide5f1202006-01-06 00:19:37 -0800374#define FUSE_COMPAT_STATFS_SIZE 48
375
Miklos Szeredie5e55582005-09-09 13:10:28 -0700376struct fuse_statfs_out {
377 struct fuse_kstatfs st;
378};
379
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700380struct fuse_fsync_in {
381 __u64 fh;
382 __u32 fsync_flags;
Miklos Szeredi06663262005-09-09 13:10:32 -0700383 __u32 padding;
Miklos Szeredib6aeade2005-09-09 13:10:30 -0700384};
385
Miklos Szeredi92a87802005-09-09 13:10:31 -0700386struct fuse_setxattr_in {
387 __u32 size;
388 __u32 flags;
389};
390
391struct fuse_getxattr_in {
392 __u32 size;
Miklos Szeredi06663262005-09-09 13:10:32 -0700393 __u32 padding;
Miklos Szeredi92a87802005-09-09 13:10:31 -0700394};
395
396struct fuse_getxattr_out {
397 __u32 size;
Miklos Szeredi06663262005-09-09 13:10:32 -0700398 __u32 padding;
Miklos Szeredi92a87802005-09-09 13:10:31 -0700399};
400
Miklos Szeredi71421252006-06-25 05:48:52 -0700401struct fuse_lk_in {
402 __u64 fh;
403 __u64 owner;
404 struct fuse_file_lock lk;
Miklos Szeredia9ff4f82007-10-18 03:07:02 -0700405 __u32 lk_flags;
406 __u32 padding;
Miklos Szeredi71421252006-06-25 05:48:52 -0700407};
408
409struct fuse_lk_out {
410 struct fuse_file_lock lk;
411};
412
Miklos Szeredi31d40d72005-11-07 00:59:50 -0800413struct fuse_access_in {
414 __u32 mask;
415 __u32 padding;
416};
417
Miklos Szeredi3ec870d2006-01-06 00:19:41 -0800418struct fuse_init_in {
Miklos Szeredi334f4852005-09-09 13:10:27 -0700419 __u32 major;
420 __u32 minor;
Miklos Szeredi9cd68452006-02-01 03:04:40 -0800421 __u32 max_readahead;
422 __u32 flags;
Miklos Szeredi334f4852005-09-09 13:10:27 -0700423};
424
Miklos Szeredi3ec870d2006-01-06 00:19:41 -0800425struct fuse_init_out {
426 __u32 major;
427 __u32 minor;
Miklos Szeredi9cd68452006-02-01 03:04:40 -0800428 __u32 max_readahead;
429 __u32 flags;
430 __u32 unused;
Miklos Szeredi3ec870d2006-01-06 00:19:41 -0800431 __u32 max_write;
432};
433
Tejun Heo151060a2009-04-14 10:54:54 +0900434#define CUSE_INIT_INFO_MAX 4096
435
436struct cuse_init_in {
437 __u32 major;
438 __u32 minor;
439 __u32 unused;
440 __u32 flags;
441};
442
443struct cuse_init_out {
444 __u32 major;
445 __u32 minor;
446 __u32 unused;
447 __u32 flags;
448 __u32 max_read;
449 __u32 max_write;
450 __u32 dev_major; /* chardev major */
451 __u32 dev_minor; /* chardev minor */
452 __u32 spare[10];
453};
454
Miklos Szeredia4d27e72006-06-25 05:48:54 -0700455struct fuse_interrupt_in {
456 __u64 unique;
457};
458
Miklos Szeredib2d22722006-12-06 20:35:51 -0800459struct fuse_bmap_in {
460 __u64 block;
461 __u32 blocksize;
462 __u32 padding;
463};
464
465struct fuse_bmap_out {
466 __u64 block;
467};
468
Tejun Heo59efec72008-11-26 12:03:55 +0100469struct fuse_ioctl_in {
470 __u64 fh;
471 __u32 flags;
472 __u32 cmd;
473 __u64 arg;
474 __u32 in_size;
475 __u32 out_size;
476};
477
478struct fuse_ioctl_out {
479 __s32 result;
480 __u32 flags;
481 __u32 in_iovs;
482 __u32 out_iovs;
483};
484
Tejun Heo95668a62008-11-26 12:03:55 +0100485struct fuse_poll_in {
486 __u64 fh;
487 __u64 kh;
488 __u32 flags;
489 __u32 padding;
490};
491
492struct fuse_poll_out {
493 __u32 revents;
494 __u32 padding;
495};
496
497struct fuse_notify_poll_wakeup_out {
498 __u64 kh;
499};
500
Miklos Szeredi334f4852005-09-09 13:10:27 -0700501struct fuse_in_header {
502 __u32 len;
503 __u32 opcode;
504 __u64 unique;
505 __u64 nodeid;
506 __u32 uid;
507 __u32 gid;
508 __u32 pid;
Miklos Szeredi06663262005-09-09 13:10:32 -0700509 __u32 padding;
Miklos Szeredi334f4852005-09-09 13:10:27 -0700510};
511
512struct fuse_out_header {
513 __u32 len;
514 __s32 error;
515 __u64 unique;
516};
517
Miklos Szeredie5e55582005-09-09 13:10:28 -0700518struct fuse_dirent {
519 __u64 ino;
520 __u64 off;
521 __u32 namelen;
522 __u32 type;
523 char name[0];
524};
525
Andrew Morton21f3da92007-07-15 23:39:50 -0700526#define FUSE_NAME_OFFSET offsetof(struct fuse_dirent, name)
Miklos Szeredie5e55582005-09-09 13:10:28 -0700527#define FUSE_DIRENT_ALIGN(x) (((x) + sizeof(__u64) - 1) & ~(sizeof(__u64) - 1))
528#define FUSE_DIRENT_SIZE(d) \
529 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
Tejun Heo29d434b2008-10-16 16:08:57 +0200530
John Muir3b463ae2009-05-31 11:13:57 -0400531struct fuse_notify_inval_inode_out {
532 __u64 ino;
533 __s64 off;
534 __s64 len;
535};
536
537struct fuse_notify_inval_entry_out {
538 __u64 parent;
539 __u32 namelen;
540 __u32 padding;
541};
542
Tejun Heo29d434b2008-10-16 16:08:57 +0200543#endif /* _LINUX_FUSE_H */