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>
encode(data_pools, bl);
encode(cas_pool, bl);
- __u16 ev = 17;
+ __u16 ev = 18;
encode(ev, bl);
encode(compat, bl);
encode(metadata_pool, bl);
if (ev >= 17) {
decode(max_xattr_size, p);
+ }
+
+ if (ev >= 18) {
decode(bal_rank_mask, p);
}