summaryrefslogtreecommitdiff
path: root/fs/ceph/mds_client.c
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2019-01-09 06:07:02 +0300
committerIlya Dryomov <idryomov@gmail.com>2019-03-05 20:55:16 +0300
commit08796873a5183bfaab52a3bd899fe82f9e64be94 (patch)
treeaf3e31c0d12b4b55ca3bf558c1538a0bff9961b2 /fs/ceph/mds_client.c
parentb37fe1f923fb4b17dc7d63406ec8dc67f13c2799 (diff)
downloadlinux-08796873a5183bfaab52a3bd899fe82f9e64be94.tar.xz
ceph: support getting ceph.dir.pin vxattr
Link: http://tracker.ceph.com/issues/37576 Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/mds_client.c')
-rw-r--r--fs/ceph/mds_client.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index e87544e42488..ddfb6a45575b 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -157,6 +157,13 @@ static int parse_reply_info_in(void **p, void *end,
ceph_decode_64_safe(p, end, change_attr, bad);
}
+ /* dir pin */
+ if (struct_v >= 2) {
+ ceph_decode_32_safe(p, end, info->dir_pin, bad);
+ } else {
+ info->dir_pin = -ENODATA;
+ }
+
*p = end;
} else {
if (features & CEPH_FEATURE_MDS_INLINE_DATA) {
@@ -187,6 +194,8 @@ static int parse_reply_info_in(void **p, void *end,
*p += info->pool_ns_len;
}
}
+
+ info->dir_pin = -ENODATA;
}
return 0;
bad: