]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
MClientRequest: handle owner_uid and owner_gid from ceph_mds_request_head_legacy 54407/head
authorAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Mon, 23 Oct 2023 12:37:44 +0000 (14:37 +0200)
committerAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Wed, 8 Nov 2023 06:28:32 +0000 (07:28 +0100)
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 <aleksandr.mikhalitsyn@canonical.com>
(cherry picked from commit a70a70f589214d6e2a5b477a61005b13ba2fec46)

src/messages/MClientRequest.h

index 3c7d83ec11b36f9834dcb3333a18881764ce7629..f63657d2e2537f573d5b716a6a70c4702c6cc03b 100644 (file)
@@ -237,6 +237,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;