From: Jeff Layton Date: Thu, 15 Apr 2021 18:37:58 +0000 (-0400) Subject: mds: add fscrypt opaque field to inode_t encoding X-Git-Tag: v18.0.0~1381^2~15 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=798bfa6bf0e7754bbdbc2bc0f3ee3b775f68164a;p=ceph.git mds: add fscrypt opaque field to inode_t encoding Add fscrypt_auth and fscrypt_file attributes to the inode_t encoding. Signed-off-by: Jeff Layton --- diff --git a/src/mds/mdstypes.h b/src/mds/mdstypes.h index bc49fe3f9212..8749ef094bdb 100644 --- a/src/mds/mdstypes.h +++ b/src/mds/mdstypes.h @@ -635,7 +635,7 @@ private: template class Allocator> void inode_t::encode(ceph::buffer::list &bl, uint64_t features) const { - ENCODE_START(17, 6, bl); + ENCODE_START(18, 6, bl); encode(ino, bl); encode(rdev, bl); @@ -691,14 +691,15 @@ void inode_t::encode(ceph::buffer::list &bl, uint64_t features) const encode(export_ephemeral_distributed_pin, bl); encode(!fscrypt_auth.empty(), bl); - + encode(fscrypt_auth, bl); + encode(fscrypt_file, bl); ENCODE_FINISH(bl); } template class Allocator> void inode_t::decode(ceph::buffer::list::const_iterator &p) { - DECODE_START_LEGACY_COMPAT_LEN(17, 6, 6, p); + DECODE_START_LEGACY_COMPAT_LEN(18, 6, 6, p); decode(ino, p); decode(rdev, p); @@ -798,9 +799,13 @@ void inode_t::decode(ceph::buffer::list::const_iterator &p) if (struct_v >= 17) { bool fscrypt_flag; - decode(fscrypt_flag, p); + decode(fscrypt_flag, p); // ignored } + if (struct_v >= 18) { + decode(fscrypt_auth, p); + decode(fscrypt_file, p); + } DECODE_FINISH(p); }