diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2007-11-28 19:22:00 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-29 12:24:54 -0500 |
commit | a6643094e73247c1ebd36816f494f631fa7be348 (patch) | |
tree | 11ba2e666b6fea1cdf579616d6a04b0afd24f61c /include | |
parent | 7dca9fd39f7d4605ac178a67bb1772381056917d (diff) |
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 <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')
-rw-r--r-- | include/linux/fuse.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index d0c437028c80..5c86f1196c3a 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h | |||
@@ -16,6 +16,7 @@ | |||
16 | * - add lk_flags in fuse_lk_in | 16 | * - add lk_flags in fuse_lk_in |
17 | * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in | 17 | * - add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in |
18 | * - add blksize field to fuse_attr | 18 | * - add blksize field to fuse_attr |
19 | * - add file flags field to fuse_read_in and fuse_write_in | ||
19 | */ | 20 | */ |
20 | 21 | ||
21 | #include <asm/types.h> | 22 | #include <asm/types.h> |
@@ -280,6 +281,8 @@ struct fuse_read_in { | |||
280 | __u32 size; | 281 | __u32 size; |
281 | __u32 read_flags; | 282 | __u32 read_flags; |
282 | __u64 lock_owner; | 283 | __u64 lock_owner; |
284 | __u32 flags; | ||
285 | __u32 padding; | ||
283 | }; | 286 | }; |
284 | 287 | ||
285 | #define FUSE_COMPAT_WRITE_IN_SIZE 24 | 288 | #define FUSE_COMPAT_WRITE_IN_SIZE 24 |
@@ -290,6 +293,8 @@ struct fuse_write_in { | |||
290 | __u32 size; | 293 | __u32 size; |
291 | __u32 write_flags; | 294 | __u32 write_flags; |
292 | __u64 lock_owner; | 295 | __u64 lock_owner; |
296 | __u32 flags; | ||
297 | __u32 padding; | ||
293 | }; | 298 | }; |
294 | 299 | ||
295 | struct fuse_write_out { | 300 | struct fuse_write_out { |