diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2007-10-18 03:07:02 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 14:37:31 -0700 |
commit | a9ff4f87056cd31a8232b88d013dc6c9ad719c18 (patch) | |
tree | 8ddcc01ae8b6615a9a530fb51c52825b315ee266 /include/linux/fuse.h | |
parent | 6ff958edbf39c014eb06b65ad25b736be08c4e63 (diff) | |
download | blackbird-op-linux-a9ff4f87056cd31a8232b88d013dc6c9ad719c18.tar.gz blackbird-op-linux-a9ff4f87056cd31a8232b88d013dc6c9ad719c18.zip |
fuse: support BSD locking semantics
It is trivial to add support for flock(2) semantics to the existing protocol,
by setting the lock owner field to the file pointer, and passing a new
FUSE_LK_FLOCK flag with the locking request.
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/fuse.h')
-rw-r--r-- | include/linux/fuse.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/fuse.h b/include/linux/fuse.h index 436047093bc4..015a8b15a388 100644 --- a/include/linux/fuse.h +++ b/include/linux/fuse.h @@ -13,6 +13,7 @@ * * 7.9: * - new fuse_getattr_in input argument of GETATTR + * - add lk_flags in fuse_lk_in */ #include <asm/types.h> @@ -113,6 +114,11 @@ struct fuse_file_lock { */ #define FUSE_GETATTR_FH (1 << 0) +/** + * Lock flags + */ +#define FUSE_LK_FLOCK (1 << 0) + enum fuse_opcode { FUSE_LOOKUP = 1, FUSE_FORGET = 2, /* no reply */ @@ -295,6 +301,8 @@ struct fuse_lk_in { __u64 fh; __u64 owner; struct fuse_file_lock lk; + __u32 lk_flags; + __u32 padding; }; struct fuse_lk_out { |