diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-09-09 13:10:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-09 14:03:46 -0700 |
commit | 413ef8cb302511d8e995e2b0e5517ee1a65b9c77 (patch) | |
tree | 59acb15a73fa0dc4393a086fb83f016105d84b2a /fs/fuse/fuse_i.h | |
parent | 5a53368277efa2d80dd2206dddc1f4b19ef0c32a (diff) | |
download | lwn-413ef8cb302511d8e995e2b0e5517ee1a65b9c77.tar.gz lwn-413ef8cb302511d8e995e2b0e5517ee1a65b9c77.zip |
[PATCH] FUSE - direct I/O
This patch adds support for the "direct_io" mount option of FUSE.
When this mount option is specified, the page cache is bypassed for
read and write operations. This is useful for example, if the
filesystem doesn't know the size of files before reading them, or when
any kind of caching is harmful.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 3ec2aff3fdb5..0af1ac646927 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -34,6 +34,9 @@ be flushed on open */ #define FUSE_KERNEL_CACHE (1 << 2) +/** Bypass the page cache for read and write operations */ +#define FUSE_DIRECT_IO (1 << 3) + /** FUSE inode */ struct fuse_inode { /** Inode data */ @@ -207,6 +210,9 @@ struct fuse_conn { /** Maximum read size */ unsigned max_read; + /** Maximum write size */ + unsigned max_write; + /** Readers of the connection are waiting on this */ wait_queue_head_t waitq; |