diff options
author | Sage Weil <sage@inktank.com> | 2013-01-21 01:07:12 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-13 21:26:13 -0500 |
commit | 1f08f2b056ea6c2e12f4e95e88949a882a996208 (patch) | |
tree | aa5d26abcd813474afd4ff49a6113e5721a12434 | |
parent | 32ab0bd78d7d9235efb38ad5cba6a3a6b39a1da6 (diff) |
ceph: add ceph.dir.layout vxattr
This virtual xattr will only appear when there is a dir layout policy
set on the directory. It can be set via setxattr and removed via
removexattr (implemented by the MDS).
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Sam Lang <sam.lang@inktank.com>
-rw-r--r-- | fs/ceph/xattr.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 532c95a6c9fa..f3c4fe7202c7 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c | |||
@@ -142,6 +142,14 @@ static size_t ceph_vxattrcb_dir_rctime(struct ceph_inode_info *ci, char *val, | |||
142 | } | 142 | } |
143 | 143 | ||
144 | static struct ceph_vxattr ceph_dir_vxattrs[] = { | 144 | static struct ceph_vxattr ceph_dir_vxattrs[] = { |
145 | { | ||
146 | .name = "ceph.dir.layout", | ||
147 | .name_size = sizeof("ceph.dir.layout"), | ||
148 | .getxattr_cb = ceph_vxattrcb_layout, | ||
149 | .readonly = false, | ||
150 | .hidden = false, | ||
151 | .exists_cb = ceph_vxattrcb_layout_exists, | ||
152 | }, | ||
145 | XATTR_NAME_CEPH(dir, entries), | 153 | XATTR_NAME_CEPH(dir, entries), |
146 | XATTR_NAME_CEPH(dir, files), | 154 | XATTR_NAME_CEPH(dir, files), |
147 | XATTR_NAME_CEPH(dir, subdirs), | 155 | XATTR_NAME_CEPH(dir, subdirs), |