mds: pass btime in InodeStat MClientReply, if feature is present

Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Sage Weil 2016-08-29 07:16:38 -04:00 committed by Jeff Layton
parent e292d2bef5
commit 4349879a69
2 changed files with 7 additions and 0 deletions

View File

@ -3357,6 +3357,9 @@ int CInode::encode_inodestat(bufferlist& bl, Session *session,
if (session->connection->has_feature(CEPH_FEATURE_FS_FILE_LAYOUT_V2)) {
::encode(layout.pool_ns, bl);
}
if (session->connection->has_feature(CEPH_FEATURE_FS_BTIME)) {
::encode(any_i->btime, bl);
}
return valid;
}

View File

@ -185,6 +185,10 @@ struct InodeStat {
if ((features & CEPH_FEATURE_FS_FILE_LAYOUT_V2))
::decode(layout.pool_ns, p);
if ((features & CEPH_FEATURE_FS_BTIME))
::decode(btime, p);
else
btime = utime_t();
}
// see CInode::encode_inodestat for encoder.