From: Alexander Mikhalitsyn Date: Mon, 23 Oct 2023 12:37:44 +0000 (+0200) Subject: MClientRequest: handle owner_uid and owner_gid from ceph_mds_request_head_legacy X-Git-Tag: v17.2.8~551^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=81c4c0fc7b8eab47c8124a3d0220766a0dab39cd;p=ceph.git MClientRequest: handle owner_uid and owner_gid from ceph_mds_request_head_legacy When a client is too old and uses struct ceph_mds_request_head_legacy we must fill new owner_uid and owner_gid fields from an old client_uid and client_gid. Fixes: https://github.com/ceph/ceph/pull/52575 Fixes: https://tracker.ceph.com/issues/63288 Fixes: commit 46cb244b9c839 ("ceph_fs.h: add separate owner_{u,g}id fields") Signed-off-by: Alexander Mikhalitsyn (cherry picked from commit a70a70f589214d6e2a5b477a61005b13ba2fec46) --- diff --git a/src/messages/MClientRequest.h b/src/messages/MClientRequest.h index 336a0019ffd43..ff76853bd60d9 100644 --- a/src/messages/MClientRequest.h +++ b/src/messages/MClientRequest.h @@ -234,6 +234,9 @@ public: head.ext_num_retry = head.num_retry; head.ext_num_fwd = head.num_fwd; + head.owner_uid = head.caller_uid; + head.owner_gid = head.caller_gid; + /* Can't set the btime from legacy struct */ if (head.op == CEPH_MDS_OP_SETATTR) { int localmask = head.args.setattr.mask;