]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: move fscrypt_auth inode_t metadata to mds_co mempool
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 22 Aug 2024 13:58:01 +0000 (09:58 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 5 Sep 2024 13:39:33 +0000 (09:39 -0400)
https://tracker.ceph.com/issues/67687
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit ed9481c1ac69b0069849d250470d9fb2d1ae06b4)

src/include/cephfs/types.h
src/mds/CInode.cc
src/mds/Locker.cc
src/mds/Server.cc

index 108878794f755074ceb73f9ec678ce21fa90e06c..2d57094f458b8c2ffb6d2de5e717861610137efa 100644 (file)
@@ -606,7 +606,7 @@ struct inode_t {
 
   std::basic_string<char,std::char_traits<char>,Allocator<char>> stray_prior_path; //stores path before unlink
 
-  std::vector<uint8_t> fscrypt_auth;
+  std::vector<uint8_t,Allocator<uint8_t>> fscrypt_auth;
   std::vector<uint8_t> fscrypt_file;
 
   bufferlist fscrypt_last_block;
index 861a6def09fa1a570d15e5a7964e70e2482ac0d7..a53d693ddf2e79ad25c6b96120f414db8b83bc67 100644 (file)
@@ -4224,7 +4224,7 @@ void CInode::encode_cap_message(const ref_t<MClientCaps> &m, Capability *cap)
   m->truncate_seq = i->truncate_seq;
   m->truncate_size = i->truncate_size;
   m->fscrypt_file = i->fscrypt_file;
-  m->fscrypt_auth = i->fscrypt_auth;
+  m->fscrypt_auth.assign(i->fscrypt_auth.begin(), i->fscrypt_auth.end());
   m->mtime = i->mtime;
   m->atime = i->atime;
   m->ctime = i->ctime;
index bacba3db2c96d17c3ca26a8cf0cbfd0c05d4f782..b976f1b32e91be5652b2521a97730a8be50ce4cc 100644 (file)
@@ -4006,7 +4006,7 @@ void Locker::_update_cap_fields(CInode *in, int dirty, const cref_t<MClientCaps>
       pi->btime = m->get_btime();
     }
     if (m->fscrypt_auth.size())
-      pi->fscrypt_auth = m->fscrypt_auth;
+      pi->fscrypt_auth.assign(m->fscrypt_auth.begin(), m->fscrypt_auth.end());
   }
 }
 
index bd8e1f11b1cfce5e0a607bb8ca387802ad8bfd09..5a5a6f32a04b56d0f9aac3c8704a8a0881e860bb 100644 (file)
@@ -3571,7 +3571,7 @@ CInode* Server::prepare_new_inode(const MDRequestRef& mdr, CDir *dir, inodeno_t
   const cref_t<MClientRequest> &req = mdr->client_request;
 
   dout(10) << "copying fscrypt_auth len " << req->fscrypt_auth.size() << dendl;
-  _inode->fscrypt_auth = req->fscrypt_auth;
+  _inode->fscrypt_auth.assign(req->fscrypt_auth.begin(), req->fscrypt_auth.end());
   _inode->fscrypt_file = req->fscrypt_file;
 
   if (req->get_data().length()) {
@@ -5472,7 +5472,7 @@ void Server::handle_client_setattr(const MDRequestRef& mdr)
   }
 
   if (mask & CEPH_SETATTR_FSCRYPT_AUTH)
-    pi.inode->fscrypt_auth = req->fscrypt_auth;
+    pi.inode->fscrypt_auth.assign(req->fscrypt_auth.begin(), req->fscrypt_auth.end());
   if (mask & CEPH_SETATTR_FSCRYPT_FILE)
     pi.inode->fscrypt_file = req->fscrypt_file;