From: Laura Flores Date: Mon, 11 Dec 2023 03:51:50 +0000 (+0000) Subject: osd: fix Incremental decode for new/old_pg_upmap_primary X-Git-Tag: v18.2.4~350^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F55046%2Fhead;p=ceph.git osd: fix Incremental decode for new/old_pg_upmap_primary Should have been included in commit e9921ee76c060122d64e61a2fe483318a49bc0a9. The impact is not major; the effect is that the osdmap is not properly updated whenever the Incremental is reused. Since the current read balancer offline tool uses a new Incremental every time it's run, the balancing works as expected. This fix will be necessary, however, for the mgr module integration in https://github.com/ceph/ceph/pull/53988 since we will need to reuse the Incremental. Signed-off-by: Laura Flores (cherry picked from commit 07c8087e59d53820543d95bb3752582b6c10045d) --- diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index f09d4d1f9f7c0..4d3160cdd56a3 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -933,6 +933,10 @@ void OSDMap::Incremental::decode(ceph::buffer::list::const_iterator& bl) decode(new_last_up_change, bl); decode(new_last_in_change, bl); } + if (struct_v >= 9) { + decode(new_pg_upmap_primary, bl); + decode(old_pg_upmap_primary, bl); + } DECODE_FINISH(bl); // client-usable data }