diff options
author | Guangliang Zhao <lucienchao@gmail.com> | 2013-11-11 02:18:03 -0500 |
---|---|---|
committer | Ilya Dryomov <ilya.dryomov@inktank.com> | 2013-12-31 13:32:01 -0500 |
commit | 7221fe4c2ed72804b28633c8e0217d65abb0023f (patch) | |
tree | 70b02b121258635837f2db4b339a5fdcc014392a /fs/ceph/super.h | |
parent | 61f68816211ee4b884dc0dda8dd4d977548f4865 (diff) |
ceph: add acl for cephfs
Signed-off-by: Guangliang Zhao <lucienchao@gmail.com>
Reviewed-by: Li Wang <li.wang@ubuntykylin.com>
Reviewed-by: Zheng Yan <zheng.z.yan@intel.com>
Diffstat (limited to 'fs/ceph/super.h')
-rw-r--r-- | fs/ceph/super.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 8de94b564d67..7fa78a7c8894 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h | |||
@@ -335,7 +335,6 @@ struct ceph_inode_info { | |||
335 | u32 i_fscache_gen; /* sequence, for delayed fscache validate */ | 335 | u32 i_fscache_gen; /* sequence, for delayed fscache validate */ |
336 | struct work_struct i_revalidate_work; | 336 | struct work_struct i_revalidate_work; |
337 | #endif | 337 | #endif |
338 | |||
339 | struct inode vfs_inode; /* at end */ | 338 | struct inode vfs_inode; /* at end */ |
340 | }; | 339 | }; |
341 | 340 | ||
@@ -725,6 +724,9 @@ extern int ceph_getattr(struct vfsmount *mnt, struct dentry *dentry, | |||
725 | /* xattr.c */ | 724 | /* xattr.c */ |
726 | extern int ceph_setxattr(struct dentry *, const char *, const void *, | 725 | extern int ceph_setxattr(struct dentry *, const char *, const void *, |
727 | size_t, int); | 726 | size_t, int); |
727 | int __ceph_setxattr(struct dentry *, const char *, const void *, size_t, int); | ||
728 | ssize_t __ceph_getxattr(struct inode *, const char *, void *, size_t); | ||
729 | int __ceph_removexattr(struct dentry *, const char *); | ||
728 | extern ssize_t ceph_getxattr(struct dentry *, const char *, void *, size_t); | 730 | extern ssize_t ceph_getxattr(struct dentry *, const char *, void *, size_t); |
729 | extern ssize_t ceph_listxattr(struct dentry *, char *, size_t); | 731 | extern ssize_t ceph_listxattr(struct dentry *, char *, size_t); |
730 | extern int ceph_removexattr(struct dentry *, const char *); | 732 | extern int ceph_removexattr(struct dentry *, const char *); |
@@ -733,6 +735,39 @@ extern void __ceph_destroy_xattrs(struct ceph_inode_info *ci); | |||
733 | extern void __init ceph_xattr_init(void); | 735 | extern void __init ceph_xattr_init(void); |
734 | extern void ceph_xattr_exit(void); | 736 | extern void ceph_xattr_exit(void); |
735 | 737 | ||
738 | /* acl.c */ | ||
739 | extern const struct xattr_handler ceph_xattr_acl_access_handler; | ||
740 | extern const struct xattr_handler ceph_xattr_acl_default_handler; | ||
741 | extern const struct xattr_handler *ceph_xattr_handlers[]; | ||
742 | |||
743 | #ifdef CONFIG_CEPH_FS_POSIX_ACL | ||
744 | |||
745 | struct posix_acl *ceph_get_acl(struct inode *, int); | ||
746 | int ceph_init_acl(struct dentry *, struct inode *, struct inode *); | ||
747 | int ceph_acl_chmod(struct dentry *, struct inode *); | ||
748 | void ceph_forget_all_cached_acls(struct inode *inode); | ||
749 | |||
750 | #else | ||
751 | |||
752 | #define ceph_get_acl NULL | ||
753 | |||
754 | static inline int ceph_init_acl(struct dentry *dentry, struct inode *inode, | ||
755 | struct inode *dir) | ||
756 | { | ||
757 | return 0; | ||
758 | } | ||
759 | |||
760 | static inline int ceph_acl_chmod(struct dentry *dentry, struct inode *inode) | ||
761 | { | ||
762 | return 0; | ||
763 | } | ||
764 | |||
765 | static inline void ceph_forget_all_cached_acls(struct inode *inode) | ||
766 | { | ||
767 | } | ||
768 | |||
769 | #endif | ||
770 | |||
736 | /* caps.c */ | 771 | /* caps.c */ |
737 | extern const char *ceph_cap_string(int c); | 772 | extern const char *ceph_cap_string(int c); |
738 | extern void ceph_handle_caps(struct ceph_mds_session *session, | 773 | extern void ceph_handle_caps(struct ceph_mds_session *session, |