Skip to content

Commit 1f08f2b

Browse files
author
Sage Weil
committed
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>
1 parent 32ab0bd commit 1f08f2b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎fs/ceph/xattr.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ static size_t ceph_vxattrcb_dir_rctime(struct ceph_inode_info *ci, char *val,
142142
}
143143

144144
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+
},
145153
XATTR_NAME_CEPH(dir, entries),
146154
XATTR_NAME_CEPH(dir, files),
147155
XATTR_NAME_CEPH(dir, subdirs),

0 commit comments

Comments
 (0)