ceph: don't include ceph.{file,dir}.layout vxattr in listxattr()
authorYan, Zheng <zheng.z.yan@intel.com>
Mon, 24 Mar 2014 11:15:05 +0000 (19:15 +0800)
committerSage Weil <sage@inktank.com>
Sat, 5 Apr 2014 04:07:21 +0000 (21:07 -0700)
This avoids 'cp -a' modifying layout of new files/directories.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
fs/ceph/xattr.c

index 28549d5f278938644be7d9cb012dd2418a89de40..c9c2b887381ec2504ee48c673cf113e396f3b04e 100644 (file)
@@ -231,7 +231,7 @@ static struct ceph_vxattr ceph_dir_vxattrs[] = {
                .name_size = sizeof("ceph.dir.layout"),
                .getxattr_cb = ceph_vxattrcb_layout,
                .readonly = false,
-               .hidden = false,
+               .hidden = true,
                .exists_cb = ceph_vxattrcb_layout_exists,
        },
        XATTR_LAYOUT_FIELD(dir, layout, stripe_unit),
@@ -258,7 +258,7 @@ static struct ceph_vxattr ceph_file_vxattrs[] = {
                .name_size = sizeof("ceph.file.layout"),
                .getxattr_cb = ceph_vxattrcb_layout,
                .readonly = false,
-               .hidden = false,
+               .hidden = true,
                .exists_cb = ceph_vxattrcb_layout_exists,
        },
        XATTR_LAYOUT_FIELD(file, layout, stripe_unit),