]> git.baikalelectronics.ru Git - kernel.git/commit
fuse: support clients that don't implement 'open'
authorAndrew Gallagher <agallagher@fb.com>
Tue, 5 Nov 2013 15:05:52 +0000 (16:05 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Wed, 22 Jan 2014 18:36:59 +0000 (19:36 +0100)
commitaab62205923cfd5bbaa564535d378710c72d7e1f
tree0625a52697800b032fd60b652833cf0ba04e43ae
parentf84782170a7d175da1005322e2f8e89ab262e644
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>
fs/fuse/file.c
fs/fuse/fuse_i.h