diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-09-30 20:03:52 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2006-09-30 20:03:52 +0000 |
commit | 0740785ee4ecd3edf07b0f311017ea00cb63698b (patch) | |
tree | 0a2275cb6cba352f1f4eeda8bfb1fc9f56c15210 /include | |
parent | 004a8c763ea66f91ed7a2a7ea9f28b4a16ba400c (diff) | |
download | libfuse-0740785ee4ecd3edf07b0f311017ea00cb63698b.tar.gz |
API changes
Diffstat (limited to 'include')
-rw-r--r-- | include/fuse.h | 5 | ||||
-rw-r--r-- | include/fuse_common.h | 10 | ||||
-rw-r--r-- | include/fuse_lowlevel.h | 14 |
3 files changed, 17 insertions, 12 deletions
diff --git a/include/fuse.h b/include/fuse.h index 797f225..37aec28 100644 --- a/include/fuse.h +++ b/include/fuse.h @@ -376,7 +376,8 @@ struct fuse_operations { * for fcntl(2). The l_whence field will always be set to * SEEK_SET. * - * For checking lock ownership, the 'owner' argument must be used. + * For checking lock ownership, the 'fuse_file_info->owner' + * argument must be used. * * For F_GETLK operation, the library will first check currently * held locks, and if a conflicting lock is found it will return @@ -399,7 +400,7 @@ struct fuse_operations { * Introduced in version 2.6 */ int (*lock) (const char *, struct fuse_file_info *, int cmd, - struct flock *, uint64_t owner); + struct flock *); /** * Change the access and modification times of a file with diff --git a/include/fuse_common.h b/include/fuse_common.h index 73cc0df..b687043 100644 --- a/include/fuse_common.h +++ b/include/fuse_common.h @@ -58,12 +58,20 @@ struct fuse_file_info { need not be invalidated. Introduced in version 2.4 */ unsigned int keep_cache : 1; + /** Indicates a flush operation. Set in flush operation, also + maybe set in highlevel lock operation and lowlevel release + operation. Introduced in version 2.6 */ + unsigned int flush : 1; + /** Padding. Do not use*/ - unsigned int padding : 30; + unsigned int padding : 29; /** File handle. May be filled in by filesystem in open(). Available in all other file operations */ uint64_t fh; + + /** Lock owner id. Available in locking operations and flush */ + uint64_t lock_owner; }; struct fuse_conn_info { diff --git a/include/fuse_lowlevel.h b/include/fuse_lowlevel.h index 83e9739..47bdeb1 100644 --- a/include/fuse_lowlevel.h +++ b/include/fuse_lowlevel.h @@ -449,7 +449,7 @@ struct fuse_lowlevel_ops { * write errors. * * If the filesystem supports file locking operations (setlk, - * getlk) it should remove all locks belonging to 'owner'. + * getlk) it should remove all locks belonging to 'fi->owner'. * * Valid replies: * fuse_reply_err @@ -457,10 +457,8 @@ struct fuse_lowlevel_ops { * @param req request handle * @param ino the inode number * @param fi file information - * @param owner lock owner id */ - void (*flush) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, - uint64_t owner); + void (*flush) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi); /** * Release an open file @@ -743,17 +741,16 @@ struct fuse_lowlevel_ops { * @param ino the inode number * @param fi file information * @param lock the region/type to test - * @param owner lock owner id of caller */ void (*getlk) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, - struct flock *lock, uint64_t owner); + struct flock *lock); /** * Acquire, modify or release a POSIX file lock * * For POSIX threads (NPTL) there's a 1-1 relation between pid and * owner, but otherwise this is not always the case. For checking - * lock ownership, 'owner' must be used. The l_pid field in + * lock ownership, 'fi->owner' must be used. The l_pid field in * 'struct flock' should only be used to fill in this field in * getlk(). * @@ -770,11 +767,10 @@ struct fuse_lowlevel_ops { * @param ino the inode number * @param fi file information * @param lock the region/type to test - * @param owner lock owner id of caller * @param sleep locking operation may sleep */ void (*setlk) (fuse_req_t req, fuse_ino_t ino, struct fuse_file_info *fi, - struct flock *lock, uint64_t owner, int sleep); + struct flock *lock, int sleep); /** * Map block index within file to block index within device |