diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2014-07-15 17:11:08 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2014-07-15 17:36:43 +0200 |
commit | 57a93b3dacbf9259178dacff5d2fbb25427f3b86 (patch) | |
tree | 09b3436bcec7b391ccc810c3d905b9b3a0158983 /include | |
parent | 52f46cfa682e284835807bcd60086a71b4365e91 (diff) | |
download | libfuse-57a93b3dacbf9259178dacff5d2fbb25427f3b86.tar.gz |
libfuse: add "time_gran" option
This allows the filesystem to specify the time granularity it
supports when the kernel is responsible for updating times
("writeback_cache" option).
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse_common.h | 10 | ||||
-rw-r--r-- | include/fuse_kernel.h | 9 |
2 files changed, 17 insertions, 2 deletions
diff --git a/include/fuse_common.h b/include/fuse_common.h index 22d9591..aec4349 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -190,9 +190,17 @@ struct fuse_conn_info { unsigned congestion_threshold; /** + * Time granularity if kernel is responsible for setting times (in nsec) + * + * Should be power of 10. A zero (default) value is equivalent to + * 1000000000 (1sec). + */ + unsigned time_gran; + + /** * For future use. */ - unsigned reserved[23]; + unsigned reserved[22]; }; struct fuse_session; diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h index 7974721..d1b4e2c 100644 --- a/include/fuse_kernel.h +++ b/include/fuse_kernel.h @@ -96,6 +96,8 @@ * * 7.23 * - add FUSE_WRITEBACK_CACHE + * - add time_gran to fuse_init_out + * - add reserved space to fuse_init_out */ #ifndef _LINUX_FUSE_H @@ -131,7 +133,7 @@ #define FUSE_KERNEL_VERSION 7 /** Minor version number of this interface */ -#define FUSE_KERNEL_MINOR_VERSION 22 +#define FUSE_KERNEL_MINOR_VERSION 23 /** The node ID of the root inode */ #define FUSE_ROOT_ID 1 @@ -559,6 +561,9 @@ struct fuse_init_in { uint32_t flags; }; +#define FUSE_COMPAT_INIT_OUT_SIZE 8 +#define FUSE_COMPAT_22_INIT_OUT_SIZE 24 + struct fuse_init_out { uint32_t major; uint32_t minor; @@ -567,6 +572,8 @@ struct fuse_init_out { uint16_t max_background; uint16_t congestion_threshold; uint32_t max_write; + uint32_t time_gran; + uint32_t unused[9]; }; #define CUSE_INIT_INFO_MAX 4096 |