From 1a8b85dcecc9e0e32b1c874559aa8a8990808b57 Mon Sep 17 00:00:00 2001 From: Laura Flores Date: Mon, 11 Dec 2023 03:51:50 +0000 Subject: [PATCH] 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) --- src/osd/OSDMap.cc | 4 ++++ 1 file changed, 4 insertions(+) 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 } -- 2.39.5