diff options
author | Jeff Layton <jlayton@kernel.org> | 2019-05-29 18:19:42 +0300 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2019-07-08 15:01:43 +0300 |
commit | 245ce991cca55eb16cfc43d1655574121b8ed85f (patch) | |
tree | 32b34cf304d0670ba5ceab89ce0a0e3416c666ba /fs/ceph/mds_client.c | |
parent | 2c66de560fa2dda0a600e908897116914db8f500 (diff) | |
download | linux-245ce991cca55eb16cfc43d1655574121b8ed85f.tar.xz |
ceph: add btime field to ceph_inode_info
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-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.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index 598a3fa280a7..636d3df47df6 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -150,14 +150,13 @@ static int parse_reply_info_in(void **p, void *end, info->pool_ns_data = *p; *p += info->pool_ns_len; } - /* btime, change_attr */ - { - struct ceph_timespec btime; - u64 change_attr; - ceph_decode_need(p, end, sizeof(btime), bad); - ceph_decode_copy(p, &btime, sizeof(btime)); - ceph_decode_64_safe(p, end, change_attr, bad); - } + + /* btime */ + ceph_decode_need(p, end, sizeof(info->btime), bad); + ceph_decode_copy(p, &info->btime, sizeof(info->btime)); + + /* change attribute */ + ceph_decode_skip_64(p, end, bad); /* dir pin */ if (struct_v >= 2) { @@ -206,6 +205,12 @@ static int parse_reply_info_in(void **p, void *end, } } + if (features & CEPH_FEATURE_FS_BTIME) { + ceph_decode_need(p, end, sizeof(info->btime), bad); + ceph_decode_copy(p, &info->btime, sizeof(info->btime)); + ceph_decode_skip_64(p, end, bad); + } + info->dir_pin = -ENODATA; /* info->snap_btime remains zero */ } |