From: Kefu Chai Date: Thu, 25 Mar 2021 04:04:37 +0000 (+0800) Subject: osd/PeeringState: init last_require_osd_release in ctor X-Git-Tag: v17.1.0~2462^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a25d097271c77c8858678f2e0fca67b896624ef2;p=ceph-ci.git osd/PeeringState: init last_require_osd_release in ctor 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 --- diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index 570ebb8b86e..4d3428976df 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -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) { diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index 946aafe1b25..a314a8d53ba 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -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 want_acting; ///< non-empty while peering needs a new acting set