diff options
| -rw-r--r-- | fs/fuse/fuse_i.h | 3 | ||||
| -rw-r--r-- | fs/fuse/inode.c | 4 | ||||
| -rw-r--r-- | include/linux/fuse.h | 7 |
3 files changed, 12 insertions, 2 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); |
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 9303348965fb..e4a9d2af9aaa 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
| @@ -57,6 +57,9 @@ | |||
| 57 | * | 57 | * |
| 58 | * 7.19 | 58 | * 7.19 |
| 59 | * - add FUSE_FALLOCATE | 59 | * - add FUSE_FALLOCATE |
| 60 | * | ||
| 61 | * 7.20 | ||
| 62 | * - add FUSE_AUTO_INVAL_DATA | ||
| 60 | */ | 63 | */ |
| 61 | 64 | ||
| 62 | #ifndef _LINUX_FUSE_H | 65 | #ifndef _LINUX_FUSE_H |
| @@ -88,7 +91,7 @@ | |||
| 88 | #define FUSE_KERNEL_VERSION 7 | 91 | #define FUSE_KERNEL_VERSION 7 |
| 89 | 92 | ||
| 90 | /** Minor version number of this interface */ | 93 | /** Minor version number of this interface */ |
| 91 | #define FUSE_KERNEL_MINOR_VERSION 19 | 94 | #define FUSE_KERNEL_MINOR_VERSION 20 |
| 92 | 95 | ||
| 93 | /** The node ID of the root inode */ | 96 | /** The node ID of the root inode */ |
| 94 | #define FUSE_ROOT_ID 1 | 97 | #define FUSE_ROOT_ID 1 |
| @@ -167,6 +170,7 @@ struct fuse_file_lock { | |||
| 167 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." | 170 | * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." |
| 168 | * FUSE_DONT_MASK: don't apply umask to file mode on create operations | 171 | * FUSE_DONT_MASK: don't apply umask to file mode on create operations |
| 169 | * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks | 172 | * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks |
| 173 | * FUSE_AUTO_INVAL_DATA: automatically invalidate cached pages | ||
| 170 | */ | 174 | */ |
| 171 | #define FUSE_ASYNC_READ (1 << 0) | 175 | #define FUSE_ASYNC_READ (1 << 0) |
| 172 | #define FUSE_POSIX_LOCKS (1 << 1) | 176 | #define FUSE_POSIX_LOCKS (1 << 1) |
| @@ -176,6 +180,7 @@ struct fuse_file_lock { | |||
| 176 | #define FUSE_BIG_WRITES (1 << 5) | 180 | #define FUSE_BIG_WRITES (1 << 5) |
| 177 | #define FUSE_DONT_MASK (1 << 6) | 181 | #define FUSE_DONT_MASK (1 << 6) |
| 178 | #define FUSE_FLOCK_LOCKS (1 << 10) | 182 | #define FUSE_FLOCK_LOCKS (1 << 10) |
| 183 | #define FUSE_AUTO_INVAL_DATA (1 << 12) | ||
| 179 | 184 | ||
| 180 | /** | 185 | /** |
| 181 | * CUSE INIT request/reply flags | 186 | * CUSE INIT request/reply flags |
