summaryrefslogtreecommitdiffstats
path: root/fs/fuse/fuse_i.h
diff options
context:
space:
mode:
authorAndrew Gallagher <agallagher@fb.com>2013-11-05 16:05:52 +0100
committerMiklos Szeredi <mszeredi@suse.cz>2014-01-22 19:36:59 +0100
commit7678ac50615d9c7a491d9861e020e4f5f71b594c (patch)
tree0625a52697800b032fd60b652833cf0ba04e43ae /fs/fuse/fuse_i.h
parentfuse: don't invalidate attrs when not using atime (diff)
downloadlinux-7678ac50615d9c7a491d9861e020e4f5f71b594c.tar.xz
linux-7678ac50615d9c7a491d9861e020e4f5f71b594c.zip
fuse: support clients that don't implement 'open'
open/release operations require userspace transitions to keep track of the open count and to perform any FS-specific setup. However, for some purely read-only FSs which don't need to perform any setup at open/release time, we can avoid the performance overhead of calling into userspace for open/release calls. This patch adds the necessary support to the fuse kernel modules to prevent open/release operations from hitting in userspace. When the client returns ENOSYS, we avoid sending the subsequent release to userspace, and also remember this so that future opens also don't trigger a userspace operation. Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to '')
-rw-r--r--fs/fuse/fuse_i.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index dc44b9e3a0c9..2da5db2c8bdb 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -485,6 +485,9 @@ struct fuse_conn {
* and hence races in setting them will not cause malfunction
*/
+ /** Is open/release not implemented by fs? */
+ unsigned no_open:1;
+
/** Is fsync not implemented by fs? */
unsigned no_fsync:1;