]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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, 22 Aug 2024 18:39:30 +0000 (14:39 -0400)
https://tracker.ceph.com/issues/67687
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
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 c2ea2facbd0cb8d32fca3824afdb70e618239b6e..06a032a172c177f68a74dc8f6277d5d129426856 100644 (file)
@@ -4238,7 +4238,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 f7c320ddd85b204e8fc09f952ba725cf2e427a80..948a5678b432be69a9f90a87c0b83fc774ccf5c3 100644 (file)
@@ -4013,7 +4013,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 c864afc46cffcc7982a3f2979ce33b40d4254339..601e5fd1f9614e634ba14374feb746070c7e9e24 100644 (file)
@@ -3594,7 +3594,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()) {
@@ -5495,7 +5495,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;