summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <miklos@szeredi.hu>2015-04-23 14:13:18 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2015-04-23 14:13:18 +0200
commit04ad73fab6ed679941958ed155169ba4146f719e (patch)
treea61eef60c589a0fb843728993063babf331b7679
parent0ecd21258e24fec185c157520435783780a1ad8f (diff)
downloadfuse-04ad73fab6ed679941958ed155169ba4146f719e.tar.gz
libfuse: add FUSE_CAP_NO_OPEN_SUPPORT flag to ->init()
-rw-r--r--ChangeLog4
-rw-r--r--include/fuse_common.h2
-rw-r--r--include/fuse_kernel.h3
-rwxr-xr-xlib/fuse_lowlevel.c2
4 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1a20560..5c1c267 100644
--- 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
diff --git a/include/fuse_common.h b/include/fuse_common.h
index aec4349..28dfc0b 100644
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -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
diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h
index 40b5ca8..25084a0 100644
--- a/include/fuse_kernel.h
+++ b/include/fuse_kernel.h
@@ -101,6 +101,7 @@
* - 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
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c
index 1911863..f25d56f 100755
--- a/lib/fuse_lowlevel.c
+++ b/lib/fuse_lowlevel.c
@@ -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;