diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2011-07-06 12:12:01 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2011-07-06 12:12:01 +0200 |
commit | 8edeaa3f29b418f621542c72d77ba0c639e6d457 (patch) | |
tree | 2ed1297e688d1f37c7b92ce09dfb38025066900c /include/fuse_kernel.h | |
parent | c605b5f73c458eeacdb6653e6899b5ebe7f1fc1a (diff) | |
download | libfuse-8edeaa3f29b418f621542c72d77ba0c639e6d457.tar.gz |
Add ->flock() operation to low and high level interfaces
This fixes problems with emulating flock() with POSIX locking.
Reported by Sebastian Pipping.
As with lock/setlk/getlk most filesystems don't need to implement
this, as the kernel takes care of file locking. The only reason to
implement locking operations is for network filesystems which want
file locking to work between clients.
Diffstat (limited to 'include/fuse_kernel.h')
-rw-r--r-- | include/fuse_kernel.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/fuse_kernel.h b/include/fuse_kernel.h index ab8b94e..8b65f46 100644 --- a/include/fuse_kernel.h +++ b/include/fuse_kernel.h @@ -73,6 +73,9 @@ * - FUSE_IOCTL_UNRESTRICTED shall now return with array of 'struct * fuse_ioctl_iovec' instead of ambiguous 'struct iovec' * - add FUSE_IOCTL_32BIT flag + * + * 7.17 + * - add FUSE_FLOCK_LOCKS and FUSE_RELEASE_FLOCK_UNLOCK */ #ifndef _LINUX_FUSE_H @@ -109,7 +112,7 @@ #define FUSE_KERNEL_VERSION 7 /** Minor version number of this interface */ -#define FUSE_KERNEL_MINOR_VERSION 16 +#define FUSE_KERNEL_MINOR_VERSION 17 /** The node ID of the root inode */ #define FUSE_ROOT_ID 1 @@ -184,8 +187,10 @@ struct fuse_file_lock { /** * INIT request/reply flags * + * FUSE_POSIX_LOCKS: remote locking for POSIX file locks * FUSE_EXPORT_SUPPORT: filesystem handles lookups of "." and ".." * FUSE_DONT_MASK: don't apply umask to file mode on create operations + * FUSE_FLOCK_LOCKS: remote locking for BSD style file locks */ #define FUSE_ASYNC_READ (1 << 0) #define FUSE_POSIX_LOCKS (1 << 1) @@ -194,6 +199,7 @@ struct fuse_file_lock { #define FUSE_EXPORT_SUPPORT (1 << 4) #define FUSE_BIG_WRITES (1 << 5) #define FUSE_DONT_MASK (1 << 6) +#define FUSE_FLOCK_LOCKS (1 << 10) /** * CUSE INIT request/reply flags @@ -206,6 +212,7 @@ struct fuse_file_lock { * Release flags */ #define FUSE_RELEASE_FLUSH (1 << 0) +#define FUSE_RELEASE_FLOCK_UNLOCK (1 << 1) /** * Getattr flags |