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.h79
1 files changed, 69 insertions, 10 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h
index 350fe9767bbc..162e5defe683 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-2006 Miklos Szeredi <miklos@szeredi.hu> 3 Copyright (C) 2001-2008 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.
@@ -20,29 +20,27 @@
20 * 20 *
21 * 7.10 21 * 7.10
22 * - add nonseekable open flag 22 * - add nonseekable open flag
23 *
24 * 7.11
25 * - add IOCTL message
26 * - add unsolicited notification support
27 * - add POLL message and NOTIFY_POLL notification
23 */ 28 */
24 29
25#ifndef _LINUX_FUSE_H 30#ifndef _LINUX_FUSE_H
26#define _LINUX_FUSE_H 31#define _LINUX_FUSE_H
27 32
28#include <asm/types.h> 33#include <linux/types.h>
29#include <linux/major.h>
30 34
31/** Version number of this interface */ 35/** Version number of this interface */
32#define FUSE_KERNEL_VERSION 7 36#define FUSE_KERNEL_VERSION 7
33 37
34/** Minor version number of this interface */ 38/** Minor version number of this interface */
35#define FUSE_KERNEL_MINOR_VERSION 10 39#define FUSE_KERNEL_MINOR_VERSION 11
36 40
37/** The node ID of the root inode */ 41/** The node ID of the root inode */
38#define FUSE_ROOT_ID 1 42#define FUSE_ROOT_ID 1
39 43
40/** The major number of the fuse character device */
41#define FUSE_MAJOR MISC_MAJOR
42
43/** The minor number of the fuse character device */
44#define FUSE_MINOR 229
45
46/* Make sure all structures are padded to 64bit boundary, so 32bit 44/* Make sure all structures are padded to 64bit boundary, so 32bit
47 userspace works under 64bit kernels */ 45 userspace works under 64bit kernels */
48 46
@@ -151,6 +149,28 @@ struct fuse_file_lock {
151 */ 149 */
152#define FUSE_READ_LOCKOWNER (1 << 1) 150#define FUSE_READ_LOCKOWNER (1 << 1)
153 151
152/**
153 * Ioctl flags
154 *
155 * FUSE_IOCTL_COMPAT: 32bit compat ioctl on 64bit machine
156 * FUSE_IOCTL_UNRESTRICTED: not restricted to well-formed ioctls, retry allowed
157 * FUSE_IOCTL_RETRY: retry with new iovecs
158 *
159 * FUSE_IOCTL_MAX_IOV: maximum of in_iovecs + out_iovecs
160 */
161#define FUSE_IOCTL_COMPAT (1 << 0)
162#define FUSE_IOCTL_UNRESTRICTED (1 << 1)
163#define FUSE_IOCTL_RETRY (1 << 2)
164
165#define FUSE_IOCTL_MAX_IOV 256
166
167/**
168 * Poll flags
169 *
170 * FUSE_POLL_SCHEDULE_NOTIFY: request poll notify
171 */
172#define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)
173
154enum fuse_opcode { 174enum fuse_opcode {
155 FUSE_LOOKUP = 1, 175 FUSE_LOOKUP = 1,
156 FUSE_FORGET = 2, /* no reply */ 176 FUSE_FORGET = 2, /* no reply */
@@ -188,6 +208,13 @@ enum fuse_opcode {
188 FUSE_INTERRUPT = 36, 208 FUSE_INTERRUPT = 36,
189 FUSE_BMAP = 37, 209 FUSE_BMAP = 37,
190 FUSE_DESTROY = 38, 210 FUSE_DESTROY = 38,
211 FUSE_IOCTL = 39,
212 FUSE_POLL = 40,
213};
214
215enum fuse_notify_code {
216 FUSE_NOTIFY_POLL = 1,
217 FUSE_NOTIFY_CODE_MAX,
191}; 218};
192 219
193/* The read buffer is required to be at least 8k, but may be much larger */ 220/* The read buffer is required to be at least 8k, but may be much larger */
@@ -388,6 +415,38 @@ struct fuse_bmap_out {
388 __u64 block; 415 __u64 block;
389}; 416};
390 417
418struct fuse_ioctl_in {
419 __u64 fh;
420 __u32 flags;
421 __u32 cmd;
422 __u64 arg;
423 __u32 in_size;
424 __u32 out_size;
425};
426
427struct fuse_ioctl_out {
428 __s32 result;
429 __u32 flags;
430 __u32 in_iovs;
431 __u32 out_iovs;
432};
433
434struct fuse_poll_in {
435 __u64 fh;
436 __u64 kh;
437 __u32 flags;
438 __u32 padding;
439};
440
441struct fuse_poll_out {
442 __u32 revents;
443 __u32 padding;
444};
445
446struct fuse_notify_poll_wakeup_out {
447 __u64 kh;
448};
449
391struct fuse_in_header { 450struct fuse_in_header {
392 __u32 len; 451 __u32 len;
393 __u32 opcode; 452 __u32 opcode;