aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-01-21 00:59:29 -0500
committerSage Weil <sage@inktank.com>2013-02-13 21:25:58 -0500
commitf36e4472969a78ae65e514b553e9a0feacb40a28 (patch)
tree0511cc3b7154791d7e651b87d9bda25972ec94d0 /fs
parentd421acb1ad7dfa31b7463b67f1593714b0b727c3 (diff)
ceph: add exists_cb to vxattr struct
Allow for a callback to dynamically determine if a vxattr exists for the given inode. Signed-off-by: Sage Weil <sage@inktank.com> Reviewed-by: Sam Lang <sam.lang@inktank.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/xattr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index 234270f00c2a..06344da4e968 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -30,6 +30,7 @@ struct ceph_vxattr {
30 size_t (*getxattr_cb)(struct ceph_inode_info *ci, char *val, 30 size_t (*getxattr_cb)(struct ceph_inode_info *ci, char *val,
31 size_t size); 31 size_t size);
32 bool readonly, hidden; 32 bool readonly, hidden;
33 bool (*exists_cb)(struct ceph_inode_info *ci);
33}; 34};
34 35
35/* directories */ 36/* directories */
@@ -92,6 +93,7 @@ static size_t ceph_vxattrcb_dir_rctime(struct ceph_inode_info *ci, char *val,
92 .getxattr_cb = ceph_vxattrcb_ ## _type ## _ ## _name, \ 93 .getxattr_cb = ceph_vxattrcb_ ## _type ## _ ## _name, \
93 .readonly = true, \ 94 .readonly = true, \
94 .hidden = false, \ 95 .hidden = false, \
96 .exists_cb = NULL, \
95 } 97 }
96 98
97static struct ceph_vxattr ceph_dir_vxattrs[] = { 99static struct ceph_vxattr ceph_dir_vxattrs[] = {