aboutsummaryrefslogtreecommitdiffstats
path: root/include/fuse_common.h
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2011-07-06 12:12:01 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2011-07-06 12:12:01 +0200
commit8edeaa3f29b418f621542c72d77ba0c639e6d457 (patch)
tree2ed1297e688d1f37c7b92ce09dfb38025066900c /include/fuse_common.h
parentc605b5f73c458eeacdb6653e6899b5ebe7f1fc1a (diff)
downloadlibfuse-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_common.h')
-rw-r--r--include/fuse_common.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/fuse_common.h b/include/fuse_common.h
index db17fa6..76f7200 100644
--- a/include/fuse_common.h
+++ b/include/fuse_common.h
@@ -70,8 +70,14 @@ struct fuse_file_info {
seekable. Introduced in version 2.8 */
unsigned int nonseekable : 1;
+ /* Indicates that flock locks for this file should be
+ released. If set, lock_owner shall contain a valid value.
+ May only be set in ->release(). Introduced in version
+ 2.9 */
+ unsigned int flock_release : 1;
+
/** Padding. Do not use*/
- unsigned int padding : 28;
+ unsigned int padding : 27;
/** File handle. May be filled in by filesystem in open().
Available in all other file operations */
@@ -103,6 +109,7 @@ struct fuse_file_info {
#define FUSE_CAP_SPLICE_WRITE (1 << 7)
#define FUSE_CAP_SPLICE_MOVE (1 << 8)
#define FUSE_CAP_SPLICE_READ (1 << 9)
+#define FUSE_CAP_FLOCK_LOCKS (1 << 10)
/**
* Ioctl flags