Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
[safe/jmp/linux-2.6] / include / linux / fuse.h
index abde994..162e5de 100644 (file)
@@ -1,6 +1,6 @@
 /*
     FUSE: Filesystem in Userspace
-    Copyright (C) 2001-2006  Miklos Szeredi <miklos@szeredi.hu>
+    Copyright (C) 2001-2008  Miklos Szeredi <miklos@szeredi.hu>
 
     This program can be distributed under the terms of the GNU GPL.
     See the file COPYING.
  *
  * 7.10
  *  - add nonseekable open flag
+ *
+ * 7.11
+ *  - add IOCTL message
+ *  - add unsolicited notification support
+ *  - add POLL message and NOTIFY_POLL notification
  */
 
 #ifndef _LINUX_FUSE_H
 #define _LINUX_FUSE_H
 
-#include <asm/types.h>
-#include <linux/major.h>
+#include <linux/types.h>
 
 /** Version number of this interface */
 #define FUSE_KERNEL_VERSION 7
 
 /** Minor version number of this interface */
-#define FUSE_KERNEL_MINOR_VERSION 10
+#define FUSE_KERNEL_MINOR_VERSION 11
 
 /** The node ID of the root inode */
 #define FUSE_ROOT_ID 1
 
-/** The major number of the fuse character device */
-#define FUSE_MAJOR MISC_MAJOR
-
 /* Make sure all structures are padded to 64bit boundary, so 32bit
    userspace works under 64bit kernels */
 
@@ -163,6 +164,13 @@ struct fuse_file_lock {
 
 #define FUSE_IOCTL_MAX_IOV     256
 
+/**
+ * Poll flags
+ *
+ * FUSE_POLL_SCHEDULE_NOTIFY: request poll notify
+ */
+#define FUSE_POLL_SCHEDULE_NOTIFY (1 << 0)
+
 enum fuse_opcode {
        FUSE_LOOKUP        = 1,
        FUSE_FORGET        = 2,  /* no reply */
@@ -201,9 +209,11 @@ enum fuse_opcode {
        FUSE_BMAP          = 37,
        FUSE_DESTROY       = 38,
        FUSE_IOCTL         = 39,
+       FUSE_POLL          = 40,
 };
 
 enum fuse_notify_code {
+       FUSE_NOTIFY_POLL   = 1,
        FUSE_NOTIFY_CODE_MAX,
 };
 
@@ -421,6 +431,22 @@ struct fuse_ioctl_out {
        __u32   out_iovs;
 };
 
+struct fuse_poll_in {
+       __u64   fh;
+       __u64   kh;
+       __u32   flags;
+       __u32   padding;
+};
+
+struct fuse_poll_out {
+       __u32   revents;
+       __u32   padding;
+};
+
+struct fuse_notify_poll_wakeup_out {
+       __u64   kh;
+};
+
 struct fuse_in_header {
        __u32   len;
        __u32   opcode;