]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix Incremental decode for new/old_pg_upmap_primary 55046/head
authorLaura Flores <lflores@ibm.com>
Mon, 11 Dec 2023 03:51:50 +0000 (03:51 +0000)
committerLaura Flores <lflores@ibm.com>
Tue, 2 Jan 2024 18:59:12 +0000 (18:59 +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>
(cherry picked from commit 07c8087e59d53820543d95bb3752582b6c10045d)

src/osd/OSDMap.cc

index f09d4d1f9f7c01e37efff3e10bbf43f779772351..4d3160cdd56a3f468143e8d930c01db0b1c0e8bd 100644 (file)
@@ -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
   }