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

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

index 2d57094f458b8c2ffb6d2de5e717861610137efa..d3da63076a006ce98c005ad9e5e2a899a1303929 100644 (file)
@@ -607,7 +607,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,Allocator<uint8_t>> fscrypt_auth;
-  std::vector<uint8_t> fscrypt_file;
+  std::vector<uint8_t,Allocator<uint8_t>> fscrypt_file;
 
   bufferlist fscrypt_last_block;
 
index a53d693ddf2e79ad25c6b96120f414db8b83bc67..986470475cdf053f596145192510b8676a26545a 100644 (file)
@@ -4223,7 +4223,7 @@ void CInode::encode_cap_message(const ref_t<MClientCaps> &m, Capability *cap)
   m->size = i->size;
   m->truncate_seq = i->truncate_seq;
   m->truncate_size = i->truncate_size;
-  m->fscrypt_file = i->fscrypt_file;
+  m->fscrypt_file.assign(i->fscrypt_file.begin(), i->fscrypt_file.end());
   m->fscrypt_auth.assign(i->fscrypt_auth.begin(), i->fscrypt_auth.end());
   m->mtime = i->mtime;
   m->atime = i->atime;
index b976f1b32e91be5652b2521a97730a8be50ce4cc..469a37f8033455983395a73470dac21a25e77667 100644 (file)
@@ -3977,7 +3977,7 @@ void Locker::_update_cap_fields(CInode *in, int dirty, const cref_t<MClientCaps>
       pi->time_warp_seq = m->get_time_warp_seq();
     }
     if (m->fscrypt_file.size())
-      pi->fscrypt_file = m->fscrypt_file;
+      pi->fscrypt_file.assign(m->fscrypt_file.begin(), m->fscrypt_file.end());
   }
   // auth
   if (dirty & CEPH_CAP_AUTH_EXCL) {
index 5a5a6f32a04b56d0f9aac3c8704a8a0881e860bb..895c915e7d6b6693c135ba355a3de4504ad55b75 100644 (file)
@@ -3572,7 +3572,7 @@ CInode* Server::prepare_new_inode(const MDRequestRef& mdr, CDir *dir, inodeno_t
 
   dout(10) << "copying fscrypt_auth len " << req->fscrypt_auth.size() << dendl;
   _inode->fscrypt_auth.assign(req->fscrypt_auth.begin(), req->fscrypt_auth.end());
-  _inode->fscrypt_file = req->fscrypt_file;
+  _inode->fscrypt_file.assign(req->fscrypt_file.begin(), req->fscrypt_file.end());
 
   if (req->get_data().length()) {
     auto p = req->get_data().cbegin();
@@ -5474,7 +5474,7 @@ void Server::handle_client_setattr(const MDRequestRef& mdr)
   if (mask & CEPH_SETATTR_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;
+    pi.inode->fscrypt_file.assign(req->fscrypt_file.begin(), req->fscrypt_file.end());
 
   pi.inode->version = cur->pre_dirty();
   pi.inode->ctime = mdr->get_op_stamp();