aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fuse')
-rw-r--r--fs/fuse/fuse_i.h3
-rw-r--r--fs/fuse/inode.c4
2 files changed, 6 insertions, 1 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index 771fb6322c07..e24dd74e3068 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -484,6 +484,9 @@ struct fuse_conn {
484 /** Is fallocate not implemented by fs? */ 484 /** Is fallocate not implemented by fs? */
485 unsigned no_fallocate:1; 485 unsigned no_fallocate:1;
486 486
487 /** Use enhanced/automatic page cache invalidation. */
488 unsigned auto_inval_data:1;
489
487 /** The number of requests waiting for completion */ 490 /** The number of requests waiting for completion */
488 atomic_t num_waiting; 491 atomic_t num_waiting;
489 492
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 1cd61652018c..dd37ee291b8b 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)
834 fc->big_writes = 1; 834 fc->big_writes = 1;
835 if (arg->flags & FUSE_DONT_MASK) 835 if (arg->flags & FUSE_DONT_MASK)
836 fc->dont_mask = 1; 836 fc->dont_mask = 1;
837 if (arg->flags & FUSE_AUTO_INVAL_DATA)
838 fc->auto_inval_data = 1;
837 } else { 839 } else {
838 ra_pages = fc->max_read / PAGE_CACHE_SIZE; 840 ra_pages = fc->max_read / PAGE_CACHE_SIZE;
839 fc->no_lock = 1; 841 fc->no_lock = 1;
@@ -859,7 +861,7 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req)
859 arg->max_readahead = fc->bdi.ra_pages * PAGE_CACHE_SIZE; 861 arg->max_readahead = fc->bdi.ra_pages * PAGE_CACHE_SIZE;
860 arg->flags |= FUSE_ASYNC_READ | FUSE_POSIX_LOCKS | FUSE_ATOMIC_O_TRUNC | 862 arg->flags |= FUSE_ASYNC_READ | FUSE_POSIX_LOCKS | FUSE_ATOMIC_O_TRUNC |
861 FUSE_EXPORT_SUPPORT | FUSE_BIG_WRITES | FUSE_DONT_MASK | 863 FUSE_EXPORT_SUPPORT | FUSE_BIG_WRITES | FUSE_DONT_MASK |
862 FUSE_FLOCK_LOCKS; 864 FUSE_FLOCK_LOCKS | FUSE_AUTO_INVAL_DATA;
863 req->in.h.opcode = FUSE_INIT; 865 req->in.h.opcode = FUSE_INIT;
864 req->in.numargs = 1; 866 req->in.numargs = 1;
865 req->in.args[0].size = sizeof(*arg); 867 req->in.args[0].size = sizeof(*arg);