From a6643094e73247c1ebd36816f494f631fa7be348 Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Wed, 28 Nov 2007 16:22:00 -0800 Subject: fuse: pass open flags to read and write Some open flags (O_APPEND, O_DIRECT) can be changed with fcntl(F_SETFL, ...) after open, but fuse currently only sends the flags to userspace in open. To make it possible to correcly handle changing flags, send the current value to userspace in each read and write. Signed-off-by: Miklos Szeredi Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/fuse.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux/fuse.h') diff --git a/include/linux/fuse.h b/include/linux/fuse.h index d0c437028c8..5c86f1196c3 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h @@ -16,6 +16,7 @@ * - 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 + * - add file flags field to fuse_read_in and fuse_write_in */ #include @@ -280,6 +281,8 @@ struct fuse_read_in { __u32 size; __u32 read_flags; __u64 lock_owner; + __u32 flags; + __u32 padding; }; #define FUSE_COMPAT_WRITE_IN_SIZE 24 @@ -290,6 +293,8 @@ struct fuse_write_in { __u32 size; __u32 write_flags; __u64 lock_owner; + __u32 flags; + __u32 padding; }; struct fuse_write_out { -- cgit v1.2.3