From: Christopher Hoffman Date: Mon, 21 Apr 2025 12:28:16 +0000 (+0000) Subject: client: Rework vxattr_cb_fscrypt_file_set to assign properly X-Git-Tag: testing/wip-vshankar-testing-20260120.085915-debug^2~13^2~54 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dcaa002f5bd1e185ca86733582e33adecd1b4c4c;p=ceph-ci.git client: Rework vxattr_cb_fscrypt_file_set to assign properly Signed-off-by: Christopher Hoffman --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 43ffb082e8c..04a3f4f24cc 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -15291,8 +15291,12 @@ int Client::_vxattrcb_fscrypt_file_set(Inode *in, const void *val, size_t size, std::vector aux; aux.resize(sizeof(uint64_t)); - memcpy(aux.data(), val, size); + uint64_t the_size; + + memcpy(&the_size, val, size); + *(ceph_le64 *)aux.data() = the_size; + // TODO: rework _do_setattr to pass mask CEPH_SETATTR_FSCRYPT_FILE return _do_setattr(in, &stx, CEPH_SETATTR_SIZE, perms, nullptr, &aux); }