]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: encode fscrypt_auth and fscrypt_file in InodeStat
authorJeff Layton <jlayton@redhat.com>
Mon, 21 Jun 2021 19:59:18 +0000 (15:59 -0400)
committerXiubo Li <xiubli@redhat.com>
Thu, 13 Jan 2022 13:08:21 +0000 (21:08 +0800)
Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/mds/CInode.cc
src/messages/MClientReply.h

index 23e98e7fb15cac1e4ea71ffa735b89b4cf03ee63..7c6285e4d6b27221fa9a52c9d0f1bfa0258d3ad6 100644 (file)
@@ -4010,7 +4010,7 @@ int CInode::encode_inodestat(bufferlist& bl, Session *session,
    * note: encoding matches MClientReply::InodeStat
    */
   if (session->info.has_feature(CEPHFS_FEATURE_REPLY_ENCODING)) {
-    ENCODE_START(6, 1, bl);
+    ENCODE_START(7, 1, bl);
     encode(oi->ino, bl);
     encode(snapid, bl);
     encode(oi->rdev, bl);
@@ -4056,6 +4056,8 @@ int CInode::encode_inodestat(bufferlist& bl, Session *session,
     encode(file_i->rstat.rsnaps, bl);
     encode(snap_metadata, bl);
     encode(!file_i->fscrypt_auth.empty(), bl);
+    encode(file_i->fscrypt_auth, bl);
+    encode(file_i->fscrypt_file, bl);
     ENCODE_FINISH(bl);
   }
   else {
index b5a99a5f9d8922a8c842215e5ad4f6ea79e32b96..46271c2327d0ee5b1c2fa0b40b2404d1ee091b0e 100644 (file)
@@ -158,7 +158,7 @@ struct InodeStat {
   void decode(ceph::buffer::list::const_iterator &p, const uint64_t features) {
     using ceph::decode;
     if (features == (uint64_t)-1) {
-      DECODE_START(6, p);
+      DECODE_START(7, p);
       decode(vino.ino, p);
       decode(vino.snapid, p);
       decode(rdev, p);
@@ -215,7 +215,11 @@ struct InodeStat {
       if (struct_v >= 6) {
         bool fscrypt_flag;
 
-        decode(fscrypt_flag, p);
+        decode(fscrypt_flag, p); // ignore this
+      }
+      if (struct_v >= 7) {
+        decode(fscrypt_auth, p);
+        decode(fscrypt_file, p);
       }
       DECODE_FINISH(p);
     }