From: Patrick Donnelly Date: Thu, 22 Aug 2024 13:58:01 +0000 (-0400) Subject: mds: move fscrypt_auth inode_t metadata to mds_co mempool X-Git-Tag: testing/wip-mchangir-testing-20250210.054048-squid-debug~3^2~2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=b20e89dc201158302ae98d5a144af351f1da417a;p=ceph-ci.git mds: move fscrypt_auth inode_t metadata to mds_co mempool https://tracker.ceph.com/issues/67687 Signed-off-by: Patrick Donnelly (cherry picked from commit ed9481c1ac69b0069849d250470d9fb2d1ae06b4) --- diff --git a/src/include/cephfs/types.h b/src/include/cephfs/types.h index 108878794f7..2d57094f458 100644 --- a/src/include/cephfs/types.h +++ b/src/include/cephfs/types.h @@ -606,7 +606,7 @@ struct inode_t { std::basic_string,Allocator> stray_prior_path; //stores path before unlink - std::vector fscrypt_auth; + std::vector> fscrypt_auth; std::vector fscrypt_file; bufferlist fscrypt_last_block; diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index 861a6def09f..a53d693ddf2 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -4224,7 +4224,7 @@ void CInode::encode_cap_message(const ref_t &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; diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index bacba3db2c9..b976f1b32e9 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -4006,7 +4006,7 @@ void Locker::_update_cap_fields(CInode *in, int dirty, const cref_t 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()); } } diff --git a/src/mds/Server.cc b/src/mds/Server.cc index bd8e1f11b1c..5a5a6f32a04 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -3571,7 +3571,7 @@ CInode* Server::prepare_new_inode(const MDRequestRef& mdr, CDir *dir, inodeno_t const cref_t &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;