From 6c5c72087967efad9e03fb9b727e3592d9085b5b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 31 Jan 2013 11:53:27 -0800 Subject: [PATCH] --- yaml --- r: 359619 b: refs/heads/master c: 8860147a01c4243f64f7d602dbf8342ca616ed45 h: refs/heads/master i: 359617: 2ed9cf6ba0deab0cd4002faa76d27cd5f0793165 359615: 79f36e38c9232d8726151eb5f1653e73c1c80b2a v: v3 --- [refs] | 2 +- trunk/fs/ceph/xattr.c | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 3a68d5bd3b85..2794dd56e740 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 39b648d9ec7d4ab0b4362872c6284a12c582afa6 +refs/heads/master: 8860147a01c4243f64f7d602dbf8342ca616ed45 diff --git a/trunk/fs/ceph/xattr.c b/trunk/fs/ceph/xattr.c index c2048b1a5395..43063d0dee8f 100644 --- a/trunk/fs/ceph/xattr.c +++ b/trunk/fs/ceph/xattr.c @@ -29,7 +29,7 @@ struct ceph_vxattr { size_t name_size; /* strlen(name) + 1 (for '\0') */ size_t (*getxattr_cb)(struct ceph_inode_info *ci, char *val, size_t size); - bool readonly; + bool readonly, hidden; }; /* directories */ @@ -85,13 +85,14 @@ static size_t ceph_vxattrcb_dir_rctime(struct ceph_inode_info *ci, char *val, #define CEPH_XATTR_NAME(_type, _name) XATTR_CEPH_PREFIX #_type "." #_name -#define XATTR_NAME_CEPH(_type, _name) \ - { \ - .name = CEPH_XATTR_NAME(_type, _name), \ - .name_size = sizeof (CEPH_XATTR_NAME(_type, _name)), \ - .getxattr_cb = ceph_vxattrcb_ ## _type ## _ ## _name, \ - .readonly = true, \ - } +#define XATTR_NAME_CEPH(_type, _name) \ + { \ + .name = CEPH_XATTR_NAME(_type, _name), \ + .name_size = sizeof (CEPH_XATTR_NAME(_type, _name)), \ + .getxattr_cb = ceph_vxattrcb_ ## _type ## _ ## _name, \ + .readonly = true, \ + .hidden = false, \ + } static struct ceph_vxattr ceph_dir_vxattrs[] = { XATTR_NAME_CEPH(dir, entries), @@ -157,7 +158,8 @@ static size_t __init vxattrs_name_size(struct ceph_vxattr *vxattrs) size_t size = 0; for (vxattr = vxattrs; vxattr->name; vxattr++) - size += vxattr->name_size; + if (!vxattr->hidden) + size += vxattr->name_size; return size; }