summaryrefslogtreecommitdiffstats
path: root/fs/fuse/inode.c
diff options
context:
space:
mode:
authorBrian Foster <bfoster@redhat.com>2012-07-16 15:23:48 -0400
committerMiklos Szeredi <mszeredi@suse.cz>2012-07-18 16:09:40 +0200
commit72d0d248ca8232dbd30d35b42d0d86e39b3e322b (patch)
treeb186ec7e6c19540660631fd2e169494657882b1d /fs/fuse/inode.c
parent84a1caf1453c3d44050bd22db958af4a7f99315c (diff)
downloadop-kernel-dev-72d0d248ca8232dbd30d35b42d0d86e39b3e322b.zip
op-kernel-dev-72d0d248ca8232dbd30d35b42d0d86e39b3e322b.tar.gz
fuse: add FUSE_AUTO_INVAL_DATA init flag
FUSE_AUTO_INVAL_DATA is provided to enable updated/auto cache invalidation logic. Signed-off-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/inode.c')
-rw-r--r--fs/fuse/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 1cd6165..dd37ee2 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -834,6 +834,8 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req)
fc->big_writes = 1;
if (arg->flags & FUSE_DONT_MASK)
fc->dont_mask = 1;
+ if (arg->flags & FUSE_AUTO_INVAL_DATA)
+ fc->auto_inval_data = 1;
} else {
ra_pages = fc->max_read / PAGE_CACHE_SIZE;
fc->no_lock = 1;
@@ -859,7 +861,7 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req)
arg->max_readahead = fc->bdi.ra_pages * PAGE_CACHE_SIZE;
arg->flags |= FUSE_ASYNC_READ | FUSE_POSIX_LOCKS | FUSE_ATOMIC_O_TRUNC |
FUSE_EXPORT_SUPPORT | FUSE_BIG_WRITES | FUSE_DONT_MASK |
- FUSE_FLOCK_LOCKS;
+ FUSE_FLOCK_LOCKS | FUSE_AUTO_INVAL_DATA;
req->in.h.opcode = FUSE_INIT;
req->in.numargs = 1;
req->in.args[0].size = sizeof(*arg);
OpenPOWER on IntegriCloud