Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359619
b: refs/heads/master
c: 8860147
h: refs/heads/master
i:
  359617: 2ed9cf6
  359615: 79f36e3
v: v3
  • Loading branch information
Sage Weil committed Feb 14, 2013
1 parent 2b680e8 commit 6c5c720
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39b648d9ec7d4ab0b4362872c6284a12c582afa6
refs/heads/master: 8860147a01c4243f64f7d602dbf8342ca616ed45
20 changes: 11 additions & 9 deletions trunk/fs/ceph/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 6c5c720

Please sign in to comment.