aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fuse.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fuse.h')
-rw-r--r--include/linux/fuse.h63
1 files changed, 60 insertions, 3 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index d41ed593f79f..3e2925a34bf0 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -25,6 +25,15 @@
25 * - add IOCTL message 25 * - add IOCTL message
26 * - add unsolicited notification support 26 * - add unsolicited notification support
27 * - add POLL message and NOTIFY_POLL notification 27 * - add POLL message and NOTIFY_POLL notification
28 *
29 * 7.12
30 * - add umask flag to input argument of open, mknod and mkdir
31 * - add notification messages for invalidation of inodes and
32 * directory entries
33 *
34 * 7.13
35 * - make max number of background requests and congestion threshold
36 * tunables
28 */ 37 */
29 38
30#ifndef _LINUX_FUSE_H 39#ifndef _LINUX_FUSE_H
@@ -32,11 +41,31 @@
32 41
33#include <linux/types.h> 42#include <linux/types.h>
34 43
44/*
45 * Version negotiation:
46 *
47 * Both the kernel and userspace send the version they support in the
48 * INIT request and reply respectively.
49 *
50 * If the major versions match then both shall use the smallest
51 * of the two minor versions for communication.
52 *
53 * If the kernel supports a larger major version, then userspace shall
54 * reply with the major version it supports, ignore the rest of the
55 * INIT message and expect a new INIT message from the kernel with a
56 * matching major version.
57 *
58 * If the library supports a larger major version, then it shall fall
59 * back to the major protocol version sent by the kernel for
60 * communication and reply with that major version (and an arbitrary
61 * supported minor version).
62 */
63
35/** Version number of this interface */ 64/** Version number of this interface */
36#define FUSE_KERNEL_VERSION 7 65#define FUSE_KERNEL_VERSION 7
37 66
38/** Minor version number of this interface */ 67/** Minor version number of this interface */
39#define FUSE_KERNEL_MINOR_VERSION 11 68#define FUSE_KERNEL_MINOR_VERSION 13
40 69
41/** The node ID of the root inode */ 70/** The node ID of the root inode */
42#define FUSE_ROOT_ID 1 71#define FUSE_ROOT_ID 1
@@ -112,6 +141,7 @@ struct fuse_file_lock {
112 * INIT request/reply flags 141 * INIT request/reply flags
113 * 142 *
114 * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." 143 * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".."
144 * FUSE_DONT_MASK: don't apply umask to file mode on create operations
115 */ 145 */
116#define FUSE_ASYNC_READ (1 << 0) 146#define FUSE_ASYNC_READ (1 << 0)
117#define FUSE_POSIX_LOCKS (1 << 1) 147#define FUSE_POSIX_LOCKS (1 << 1)
@@ -119,6 +149,7 @@ struct fuse_file_lock {
119#define FUSE_ATOMIC_O_TRUNC (1 << 3) 149#define FUSE_ATOMIC_O_TRUNC (1 << 3)
120#define FUSE_EXPORT_SUPPORT (1 << 4) 150#define FUSE_EXPORT_SUPPORT (1 << 4)
121#define FUSE_BIG_WRITES (1 << 5) 151#define FUSE_BIG_WRITES (1 << 5)
152#define FUSE_DONT_MASK (1 << 6)
122 153
123/** 154/**
124 * CUSE INIT request/reply flags 155 * CUSE INIT request/reply flags
@@ -224,6 +255,8 @@ enum fuse_opcode {
224 255
225enum fuse_notify_code { 256enum fuse_notify_code {
226 FUSE_NOTIFY_POLL = 1, 257 FUSE_NOTIFY_POLL = 1,
258 FUSE_NOTIFY_INVAL_INODE = 2,
259 FUSE_NOTIFY_INVAL_ENTRY = 3,
227 FUSE_NOTIFY_CODE_MAX, 260 FUSE_NOTIFY_CODE_MAX,
228}; 261};
229 262
@@ -262,14 +295,18 @@ struct fuse_attr_out {
262 struct fuse_attr attr; 295 struct fuse_attr attr;
263}; 296};
264 297
298#define FUSE_COMPAT_MKNOD_IN_SIZE 8
299
265struct fuse_mknod_in { 300struct fuse_mknod_in {
266 __u32 mode; 301 __u32 mode;
267 __u32 rdev; 302 __u32 rdev;
303 __u32 umask;
304 __u32 padding;
268}; 305};
269 306
270struct fuse_mkdir_in { 307struct fuse_mkdir_in {
271 __u32 mode; 308 __u32 mode;
272 __u32 padding; 309 __u32 umask;
273}; 310};
274 311
275struct fuse_rename_in { 312struct fuse_rename_in {
@@ -301,7 +338,14 @@ struct fuse_setattr_in {
301 338
302struct fuse_open_in { 339struct fuse_open_in {
303 __u32 flags; 340 __u32 flags;
341 __u32 unused;
342};
343
344struct fuse_create_in {
345 __u32 flags;
304 __u32 mode; 346 __u32 mode;
347 __u32 umask;
348 __u32 padding;
305}; 349};
306 350
307struct fuse_open_out { 351struct fuse_open_out {
@@ -407,7 +451,8 @@ struct fuse_init_out {
407 __u32 minor; 451 __u32 minor;
408 __u32 max_readahead; 452 __u32 max_readahead;
409 __u32 flags; 453 __u32 flags;
410 __u32 unused; 454 __u16 max_background;
455 __u16 congestion_threshold;
411 __u32 max_write; 456 __u32 max_write;
412}; 457};
413 458
@@ -508,4 +553,16 @@ struct fuse_dirent {
508#define FUSE_DIRENT_SIZE(d) \ 553#define FUSE_DIRENT_SIZE(d) \
509 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen) 554 FUSE_DIRENT_ALIGN(FUSE_NAME_OFFSET + (d)->namelen)
510 555
556struct fuse_notify_inval_inode_out {
557 __u64 ino;
558 __s64 off;
559 __s64 len;
560};
561
562struct fuse_notify_inval_entry_out {
563 __u64 parent;
564 __u32 namelen;
565 __u32 padding;
566};
567
511#endif /* _LINUX_FUSE_H */ 568#endif /* _LINUX_FUSE_H */