]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix Incremental decode for new/old_pg_upmap_primary 54907/head
authorLaura Flores <lflores@ibm.com>
Mon, 11 Dec 2023 03:51:50 +0000 (03:51 +0000)
committerLaura Flores <lflores@ibm.com>
Thu, 14 Dec 2023 22:11:56 +0000 (22:11 +0000)
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 <lflores@ibm.com>
src/osd/OSDMap.cc

index 8f60b2f3c83cf8aa8fd50352e3e45d0d6cc4f7b8..434146d9647edf942b43989b16ae11806207a092 100644 (file)
@@ -934,6 +934,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
   }