diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2007-10-18 03:07:05 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 14:37:31 -0700 |
commit | 0e9663ee452ffce0d429656ebbcfe69417a30e92 (patch) | |
tree | a72825f122c9e38d4adc42ebcfd127f366da4a0f /include/linux | |
parent | f33321141b273d60cbb3a8f56a5489baad82ba5e (diff) | |
download | op-kernel-dev-0e9663ee452ffce0d429656ebbcfe69417a30e92.zip op-kernel-dev-0e9663ee452ffce0d429656ebbcfe69417a30e92.tar.gz |
fuse: add blksize field to fuse_attr
There are cases when the filesystem will be passed the buffer from a single
read or write call, namely:
1) in 'direct-io' mode (not O_DIRECT), read/write requests don't go
through the page cache, but go directly to the userspace fs
2) currently buffered writes are done with single page requests, but
if Nick's ->perform_write() patch goes it, it will be possible to
do larger write requests. But only if the original write() was
also bigger than a page.
In these cases the filesystem might want to give a hint to the app
about the optimal I/O size.
Allow the userspace filesystem to supply a blksize value to be returned by
stat() and friends. If the field is zero, it defaults to the old
PAGE_CACHE_SIZE value.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/fuse.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 7d4fa5b..d0c4370 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h @@ -15,6 +15,7 @@ * - new fuse_getattr_in input argument of GETATTR * - add lk_flags in fuse_lk_in * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in + * - add blksize field to fuse_attr */ #include <asm/types.h> @@ -53,6 +54,8 @@ struct fuse_attr { __u32 uid; __u32 gid; __u32 rdev; + __u32 blksize; + __u32 padding; }; struct fuse_kstatfs { @@ -177,6 +180,8 @@ enum fuse_opcode { /* The read buffer is required to be at least 8k, but may be much larger */ #define FUSE_MIN_READ_BUFFER 8192 +#define FUSE_COMPAT_ENTRY_OUT_SIZE 120 + struct fuse_entry_out { __u64 nodeid; /* Inode ID */ __u64 generation; /* Inode generation: nodeid:gen must @@ -198,6 +203,8 @@ struct fuse_getattr_in { __u64 fh; }; +#define FUSE_COMPAT_ATTR_OUT_SIZE 96 + struct fuse_attr_out { __u64 attr_valid; /* Cache timeout for the attributes */ __u32 attr_valid_nsec; |