From aea4990d3cf147a059cf32532e2d134a123add8a Mon Sep 17 00:00:00 2001 From: Christopher Hoffman Date: Fri, 18 Apr 2025 20:55:02 +0000 Subject: [PATCH] client: provide fscrypt vxattrs in CapSnap Fixes: https://tracker.ceph.com/issues/70979 Signed-off-by: Christopher Hoffman --- src/client/Client.cc | 4 ++++ src/client/Inode.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/client/Client.cc b/src/client/Client.cc index c29f69c7e449d..43ffb082e8c38 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -4387,6 +4387,8 @@ void Client::finish_cap_snap(Inode *in, CapSnap &capsnap, int used) { ldout(cct, 10) << __func__ << " " << *in << " capsnap " << (void *)&capsnap << " used " << ccap_string(used) << dendl; capsnap.size = in->size; + capsnap.fscrypt_auth = in->fscrypt_auth; + capsnap.fscrypt_file = in->fscrypt_file; capsnap.mtime = in->mtime; capsnap.atime = in->atime; capsnap.ctime = in->ctime; @@ -4441,6 +4443,8 @@ void Client::send_flush_snap(Inode *in, MetaSession *session, m->head.xattr_version = capsnap.xattr_version; encode(capsnap.xattrs, m->xattrbl); + m->fscrypt_file = capsnap.fscrypt_auth; + m->fscrypt_file = capsnap.fscrypt_file; m->ctime = capsnap.ctime; m->btime = capsnap.btime; m->mtime = capsnap.mtime; diff --git a/src/client/Inode.h b/src/client/Inode.h index b899f9afa39cb..76dd52fcdfb5e 100644 --- a/src/client/Inode.h +++ b/src/client/Inode.h @@ -99,6 +99,8 @@ struct CapSnap { gid_t gid = 0; std::map xattrs; version_t xattr_version = 0; + std::vector fscrypt_auth; + std::vector fscrypt_file; bufferlist inline_data; version_t inline_version = 0; -- 2.39.5