libfuse: add FUSE_CAP_NO_OPEN_SUPPORT flag to ->init()
authorMiklos Szeredi <miklos@szeredi.hu>
Thu, 23 Apr 2015 12:13:18 +0000 (14:13 +0200)
committerMiklos Szeredi <mszeredi@suse.cz>
Thu, 23 Apr 2015 12:13:18 +0000 (14:13 +0200)
ChangeLog
include/fuse_common.h
include/fuse_kernel.h
lib/fuse_lowlevel.c

index 1a20560e9b687c722896222400111f94a2d01f56..5c1c267da1136b03a917eb65db331ea4758c9497 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-04-23  Miklos Szeredi <miklos@szeredi.hu>
+
+       * libfuse: add FUSE_CAP_NO_OPEN_SUPPORT flag to ->init()
+
 2015-02-26  Miklos Szeredi <miklos@szeredi.hu>
 
        * libfuse: fix fuse_remove_signal_handlers() to properly restore
index aec4349c60ab4297258feefe738f23781ef7b561..28dfc0ba3565387df4440de9a7a5286b9217113a 100644 (file)
@@ -101,6 +101,7 @@ struct fuse_file_info {
  * FUSE_CAP_READDIRPLUS_AUTO: adaptive readdirplus
  * FUSE_CAP_ASYNC_DIO: asynchronous direct I/O submission
  * FUSE_CAP_WRITEBACK_CACHE: use writeback cache for buffered writes
+ * FUSE_CAP_NO_OPEN_SUPPORT: support zero-message opens
  */
 #define FUSE_CAP_ASYNC_READ            (1 << 0)
 #define FUSE_CAP_POSIX_LOCKS           (1 << 1)
@@ -118,6 +119,7 @@ struct fuse_file_info {
 #define FUSE_CAP_READDIRPLUS_AUTO      (1 << 14)
 #define FUSE_CAP_ASYNC_DIO             (1 << 15)
 #define FUSE_CAP_WRITEBACK_CACHE       (1 << 16)
+#define FUSE_CAP_NO_OPEN_SUPPORT       (1 << 17)
 
 /**
  * Ioctl flags
index 40b5ca8a1b1f3028e5e03c5b3372f98e39437422..25084a052a1eff964d19a9683d5d6470590e4c7e 100644 (file)
  *  - add FATTR_CTIME
  *  - add ctime and ctimensec to fuse_setattr_in
  *  - add FUSE_RENAME2 request
+ *  - add FUSE_NO_OPEN_SUPPORT flag
  */
 
 #ifndef _LINUX_FUSE_H
@@ -229,6 +230,7 @@ struct fuse_file_lock {
  * FUSE_READDIRPLUS_AUTO: adaptive readdirplus
  * FUSE_ASYNC_DIO: asynchronous direct I/O submission
  * FUSE_WRITEBACK_CACHE: use writeback cache for buffered writes
+ * FUSE_NO_OPEN_SUPPORT: kernel supports zero-message opens
  */
 #define FUSE_ASYNC_READ                (1 << 0)
 #define FUSE_POSIX_LOCKS       (1 << 1)
@@ -247,6 +249,7 @@ struct fuse_file_lock {
 #define FUSE_READDIRPLUS_AUTO  (1 << 14)
 #define FUSE_ASYNC_DIO         (1 << 15)
 #define FUSE_WRITEBACK_CACHE   (1 << 16)
+#define FUSE_NO_OPEN_SUPPORT   (1 << 17)
 
 /**
  * CUSE INIT request/reply flags
index 191186356eed369d66230874f33754b8ca773454..f25d56fe3c8892a4cea19215f25c07115229fe5f 100755 (executable)
@@ -1923,6 +1923,8 @@ static void do_init(fuse_req_t req, fuse_ino_t nodeid, const void *inarg)
                        f->conn.capable |= FUSE_CAP_ASYNC_DIO;
                if (arg->flags & FUSE_WRITEBACK_CACHE)
                        f->conn.capable |= FUSE_CAP_WRITEBACK_CACHE;
+               if (arg->flags & FUSE_NO_OPEN_SUPPORT)
+                       f->conn.capable |= FUSE_CAP_NO_OPEN_SUPPORT;
        } else {
                f->conn.async_read = 0;
                f->conn.max_readahead = 0;