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-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=60d2b304eca870992aed0cd3e4741d5bc7664901;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 2a864a6092d..b1daaeb5d96 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -15174,8 +15174,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); }