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.h36
1 files changed, 32 insertions, 4 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index 5425b60021e3..9fc48a674b82 100644
--- a/include/linux/fuse.h
+++ b/include/linux/fuse.h
@@ -1,6 +1,6 @@
1/* 1/*
2 FUSE: Filesystem in Userspace 2 FUSE: Filesystem in Userspace
3 Copyright (C) 2001-2005 Miklos Szeredi <miklos@szeredi.hu> 3 Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu>
4 4
5 This program can be distributed under the terms of the GNU GPL. 5 This program can be distributed under the terms of the GNU GPL.
6 See the file COPYING. 6 See the file COPYING.
@@ -9,18 +9,19 @@
9/* This file defines the kernel interface of FUSE */ 9/* This file defines the kernel interface of FUSE */
10 10
11#include <asm/types.h> 11#include <asm/types.h>
12#include <linux/major.h>
12 13
13/** Version number of this interface */ 14/** Version number of this interface */
14#define FUSE_KERNEL_VERSION 7 15#define FUSE_KERNEL_VERSION 7
15 16
16/** Minor version number of this interface */ 17/** Minor version number of this interface */
17#define FUSE_KERNEL_MINOR_VERSION 6 18#define FUSE_KERNEL_MINOR_VERSION 7
18 19
19/** The node ID of the root inode */ 20/** The node ID of the root inode */
20#define FUSE_ROOT_ID 1 21#define FUSE_ROOT_ID 1
21 22
22/** The major number of the fuse character device */ 23/** The major number of the fuse character device */
23#define FUSE_MAJOR 10 24#define FUSE_MAJOR MISC_MAJOR
24 25
25/** The minor number of the fuse character device */ 26/** The minor number of the fuse character device */
26#define FUSE_MINOR 229 27#define FUSE_MINOR 229
@@ -58,6 +59,13 @@ struct fuse_kstatfs {
58 __u32 spare[6]; 59 __u32 spare[6];
59}; 60};
60 61
62struct fuse_file_lock {
63 __u64 start;
64 __u64 end;
65 __u32 type;
66 __u32 pid; /* tgid */
67};
68
61/** 69/**
62 * Bitmasks for fuse_setattr_in.valid 70 * Bitmasks for fuse_setattr_in.valid
63 */ 71 */
@@ -82,6 +90,7 @@ struct fuse_kstatfs {
82 * INIT request/reply flags 90 * INIT request/reply flags
83 */ 91 */
84#define FUSE_ASYNC_READ (1 << 0) 92#define FUSE_ASYNC_READ (1 << 0)
93#define FUSE_POSIX_LOCKS (1 << 1)
85 94
86enum fuse_opcode { 95enum fuse_opcode {
87 FUSE_LOOKUP = 1, 96 FUSE_LOOKUP = 1,
@@ -112,8 +121,12 @@ enum fuse_opcode {
112 FUSE_READDIR = 28, 121 FUSE_READDIR = 28,
113 FUSE_RELEASEDIR = 29, 122 FUSE_RELEASEDIR = 29,
114 FUSE_FSYNCDIR = 30, 123 FUSE_FSYNCDIR = 30,
124 FUSE_GETLK = 31,
125 FUSE_SETLK = 32,
126 FUSE_SETLKW = 33,
115 FUSE_ACCESS = 34, 127 FUSE_ACCESS = 34,
116 FUSE_CREATE = 35 128 FUSE_CREATE = 35,
129 FUSE_INTERRUPT = 36,
117}; 130};
118 131
119/* The read buffer is required to be at least 8k, but may be much larger */ 132/* The read buffer is required to be at least 8k, but may be much larger */
@@ -199,6 +212,7 @@ struct fuse_flush_in {
199 __u64 fh; 212 __u64 fh;
200 __u32 flush_flags; 213 __u32 flush_flags;
201 __u32 padding; 214 __u32 padding;
215 __u64 lock_owner;
202}; 216};
203 217
204struct fuse_read_in { 218struct fuse_read_in {
@@ -247,6 +261,16 @@ struct fuse_getxattr_out {
247 __u32 padding; 261 __u32 padding;
248}; 262};
249 263
264struct fuse_lk_in {
265 __u64 fh;
266 __u64 owner;
267 struct fuse_file_lock lk;
268};
269
270struct fuse_lk_out {
271 struct fuse_file_lock lk;
272};
273
250struct fuse_access_in { 274struct fuse_access_in {
251 __u32 mask; 275 __u32 mask;
252 __u32 padding; 276 __u32 padding;
@@ -268,6 +292,10 @@ struct fuse_init_out {
268 __u32 max_write; 292 __u32 max_write;
269}; 293};
270 294
295struct fuse_interrupt_in {
296 __u64 unique;
297};
298
271struct fuse_in_header { 299struct fuse_in_header {
272 __u32 len; 300 __u32 len;
273 __u32 opcode; 301 __u32 opcode;