]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: encode `bal_rank_mask` using a higher (next) version 53340/head
authorVenky Shankar <vshankar@redhat.com>
Fri, 1 Dec 2023 09:32:20 +0000 (04:32 -0500)
committerMykola Golub <mgolub@suse.com>
Thu, 14 Dec 2023 11:18:34 +0000 (13:18 +0200)
commitd8cebd674ec49cd1981f6ee4038318b8f675fb9d
tree5791747cc8d7dbf1c5223b6e4f4dd0a35caae688
parent4c874dd2ec7b85c8ee519fff7a1f65f9e04442e6
mds: encode `bal_rank_mask` using a higher (next) version

This is required for a reef client to work with a higher revision
MDS, since essentially, this happens:

reef(client):

if (version >=17) {
    decode(bal_rank_mask, p);
}

and higher-revision MDS (say, upcoming squid):

version = 17
encode(version, bl);
...
...
encode(max_xattr_size, bl);
encode(bal_rank_mask, bl);

The client incorrectly decodes max_xattr_size (type: uint64_t) into
bal_rank_mask (type: string).

This situation ended up due to a couple of reasons:

* the kclient patchset hanlding `max_xattr_size` was merged early on
  and another MDS side change that bumped the MDSMap encoding version
  to 17 got merged in the midst (PR #43284). Details in comment:

        https://github.com/ceph/ceph/pull/46357#issuecomment-1293556227

* The reef backport for PR #46357 got delayed (and, reef branched out).

Which means reef(18.2.0) user-space clients are broken with higher version
MDSs.

Fixes: https://tracker.ceph.com/issues/63713
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 36ee8e7ed365933b264321c15f77c0ed1e352d8c)
src/mds/MDSMap.cc