diff options
author | Greg Farnum <gregf@hq.newdream.net> | 2010-08-02 18:34:23 -0400 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-08-02 19:10:53 -0400 |
commit | 40819f6fb227c1832935b775ac22aef10aa6f6dd (patch) | |
tree | 14f3e73f9585cc157ab2daab487c7b3964394fe2 /fs/ceph/super.h | |
parent | fbaad9797a761c2d5ff6e755bbb4c046207a1ca2 (diff) |
ceph: add flock/fcntl lock support
Implement flock inode operation to support advisory file locking. All
lock/unlock operations are synchronous with the MDS. Lock state is
sent when reconnecting to a recovering MDS to restore the shared lock
state.
Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 83f7cc5fab10..95adce441cc0 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -892,6 +892,14 @@ extern void ceph_debugfs_cleanup(void); | |||
892 | extern int ceph_debugfs_client_init(struct ceph_client *client); | 892 | extern int ceph_debugfs_client_init(struct ceph_client *client); |
893 | extern void ceph_debugfs_client_cleanup(struct ceph_client *client); | 893 | extern void ceph_debugfs_client_cleanup(struct ceph_client *client); |
894 | 894 | ||
895 | /* locks.c */ | ||
896 | extern int ceph_lock(struct file *file, int cmd, struct file_lock *fl); | ||
897 | extern int ceph_flock(struct file *file, int cmd, struct file_lock *fl); | ||
898 | extern void ceph_count_locks(struct inode *inode, int *p_num, int *f_num); | ||
899 | extern int ceph_encode_locks(struct inode *i, struct ceph_pagelist *p, | ||
900 | int p_locks, int f_locks); | ||
901 | extern int lock_to_ceph_filelock(struct file_lock *fl, struct ceph_filelock *c); | ||
902 | |||
895 | static inline struct inode *get_dentry_parent_inode(struct dentry *dentry) | 903 | static inline struct inode *get_dentry_parent_inode(struct dentry *dentry) |
896 | { | 904 | { |
897 | if (dentry && dentry->d_parent) | 905 | if (dentry && dentry->d_parent) |