From: Jeff Layton Date: Mon, 29 Aug 2016 11:16:39 +0000 (-0400) Subject: mds: pass change_attr in InodeStat MClientReply, if feature is present X-Git-Tag: v11.0.1~326^2~20 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b07a707ad0ea31b1ef34ea949751d14c55bc1e8a;p=ceph-ci.git mds: pass change_attr in InodeStat MClientReply, if feature is present Signed-off-by: Jeff Layton --- diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index 11f50fd97d4..365f3ab812e 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -3359,6 +3359,7 @@ int CInode::encode_inodestat(bufferlist& bl, Session *session, } if (session->connection->has_feature(CEPH_FEATURE_FS_BTIME)) { ::encode(any_i->btime, bl); + ::encode(any_i->change_attr, bl); } return valid; diff --git a/src/messages/MClientReply.h b/src/messages/MClientReply.h index a9974481975..c5e7d3912de 100644 --- a/src/messages/MClientReply.h +++ b/src/messages/MClientReply.h @@ -105,6 +105,7 @@ struct InodeStat { utime_t ctime, btime, mtime, atime; uint32_t time_warp_seq; uint64_t size, max_size; + uint64_t change_attr; uint64_t truncate_size; uint32_t truncate_seq; uint32_t mode, uid, gid, nlink; @@ -185,10 +186,13 @@ struct InodeStat { if ((features & CEPH_FEATURE_FS_FILE_LAYOUT_V2)) ::decode(layout.pool_ns, p); - if ((features & CEPH_FEATURE_FS_BTIME)) + if ((features & CEPH_FEATURE_FS_BTIME)) { ::decode(btime, p); - else + ::decode(change_attr, p); + } else { btime = utime_t(); + change_attr = 0; + } } // see CInode::encode_inodestat for encoder.