]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/PeeringState: init last_require_osd_release in ctor
authorKefu Chai <kchai@redhat.com>
Thu, 25 Mar 2021 04:04:37 +0000 (12:04 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 25 Mar 2021 04:52:03 +0000 (12:52 +0800)
so we can use the latest osdmap to tell what is the required osd release in
*current* cluster before consuming a new osdmap which is fed to
PeeringState only if we advance to a new map.

a osd shares its pg_info using MOSDPGInfo2 or MOSDPGInfo according to
PeeringState::last_require_osd_release, this happens before a new osdmap
is fully consumed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/osd/PeeringState.cc
src/osd/PeeringState.h

index 570ebb8b86ec2d7d9fbadb29537afcd161fec5d4..4d3428976dfc877c0bb4c995649c3469ad5eb006 100644 (file)
@@ -120,6 +120,7 @@ PeeringState::PeeringState(
     pg_whoami(pg_whoami),
     info(spgid),
     pg_log(cct),
+    last_require_osd_release(curmap->require_osd_release),
     missing_loc(spgid, this, dpp, cct),
     machine(this, cct, spgid, dpp, pl, &state_history)
 {
index 946aafe1b258bae43cc9b63240ff6fee5d536371..a314a8d53ba8ae6157b5186c764a5129e9e3dd28 100644 (file)
@@ -1466,7 +1466,7 @@ public:
   uint64_t upacting_features = CEPH_FEATURES_SUPPORTED_DEFAULT;
 
   /// most recently consumed osdmap's require_osd_version
-  ceph_release_t last_require_osd_release = ceph_release_t::unknown;
+  ceph_release_t last_require_osd_release;
 
   std::vector<int> want_acting; ///< non-empty while peering needs a new acting set