]> Pileus Git - ~andy/linux/commitdiff
ceph: add exists_cb to vxattr struct
authorSage Weil <sage@inktank.com>
Mon, 21 Jan 2013 05:59:29 +0000 (21:59 -0800)
committerSage Weil <sage@inktank.com>
Thu, 14 Feb 2013 02:25:58 +0000 (18:25 -0800)
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>
fs/ceph/xattr.c

index 234270f00c2a0f9e38ec088db9100c6fe6d5d384..06344da4e9687607e5357d78d22dcb506015cf8e 100644 (file)
@@ -30,6 +30,7 @@ struct ceph_vxattr {
        size_t (*getxattr_cb)(struct ceph_inode_info *ci, char *val,
                              size_t size);
        bool readonly, hidden;
+       bool (*exists_cb)(struct ceph_inode_info *ci);
 };
 
 /* directories */
@@ -92,6 +93,7 @@ static size_t ceph_vxattrcb_dir_rctime(struct ceph_inode_info *ci, char *val,
                .getxattr_cb = ceph_vxattrcb_ ## _type ## _ ## _name, \
                .readonly = true,                               \
                .hidden = false,                                \
+               .exists_cb = NULL,                      \
        }
 
 static struct ceph_vxattr ceph_dir_vxattrs[] = {