From 04ad73fab6ed679941958ed155169ba4146f719e Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Thu, 23 Apr 2015 14:13:18 +0200 Subject: [PATCH] libfuse: add FUSE_CAP_NO_OPEN_SUPPORT flag to ->init() --- ChangeLog | 4 ++++ include/fuse_common.h | 2 ++ include/fuse_kernel.h | 3 +++ lib/fuse_lowlevel.c | 2 ++ 4 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1a20560..5c1c267 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2015-04-23 Miklos Szeredi + + * libfuse: add FUSE_CAP_NO_OPEN_SUPPORT flag to ->init() + 2015-02-26 Miklos Szeredi * 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; -- 2.30.2