From 377f3d1b8b418f4497dac97fb8b6c433348330ce Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Mon, 9 Jun 2008 10:52:50 +0000 Subject: Don't allow bigger than 4kB writes by default... --- include/fuse_common.h | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'include/fuse_common.h') diff --git a/include/fuse_common.h b/include/fuse_common.h index 1030139..2543225 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -76,6 +76,19 @@ struct fuse_file_info { uint64_t lock_owner; }; +/** + * Capability bits for 'fuse_conn_info.capable' and 'fuse_conn_info.want' + * + * FUSE_CAP_ASYNC_READ: filesystem supports asynchronous read requests + * FUSE_CAP_POSIX_LOCKS: filesystem supports "remote" locking + * FUSE_CAP_ATOMIC_O_TRUNC: filesystem handles the O_TRUNC open flag + * FUSE_CAP_BIG_WRITES: filesystem can handle write size larger than 4kB + */ +#define FUSE_CAP_ASYNC_READ (1 << 0) +#define FUSE_CAP_POSIX_LOCKS (1 << 1) +#define FUSE_CAP_ATOMIC_O_TRUNC (1 << 3) +#define FUSE_CAP_BIG_WRITES (1 << 5) + /** * Connection information, passed to the ->init() method * @@ -110,14 +123,19 @@ struct fuse_conn_info { unsigned max_readahead; /** - * Is atomic open+truncate supported + * Capability flags, that the kernel supports + */ + unsigned capable; + + /** + * Capability flags, that the filesystem wants to enable */ - unsigned atomic_o_trunc; + unsigned want; /** * For future use. */ - unsigned reserved[26]; + unsigned reserved[25]; }; struct fuse_session; -- cgit v1.2.3