From: Matan Breizman Date: Thu, 3 Nov 2022 08:59:11 +0000 (+0000) Subject: osd: Remove oldest_stored_osdmap() X-Git-Tag: v18.1.0~278^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2541b49927670927fc34acf4af712fdb9f7a5bf7;p=ceph.git osd: Remove oldest_stored_osdmap() The only usage was for identyfing map gaps on new intervals. We should use max_oldest_stored_osdmap() instead, since a specific osd's oldest_map may lag behind. Signed-off-by: Matan Breizman --- diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index 25b585ef6f8..13f802b2ce8 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -363,10 +363,6 @@ public: void on_active_advmap(const OSDMapRef &osdmap) final { // Not needed yet } - epoch_t oldest_stored_osdmap() final { - // TODO - return 0; - } epoch_t max_oldest_stored_osdmap() final { // TODO diff --git a/src/osd/PG.cc b/src/osd/PG.cc index c8bad743bd6..d6eb67c9688 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1745,10 +1745,6 @@ void PG::on_new_interval() m_scrubber->on_primary_change(__func__, m_planned_scrub); } -epoch_t PG::oldest_stored_osdmap() { - return osd->get_superblock().oldest_map; -} - epoch_t PG::max_oldest_stored_osdmap() { return osd->get_superblock().max_oldest_map; } diff --git a/src/osd/PG.h b/src/osd/PG.h index f1c07d1bc17..21e2453a192 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -593,7 +593,6 @@ public: void clear_publish_stats() override; void clear_primary_state() override; - epoch_t oldest_stored_osdmap() override; epoch_t max_oldest_stored_osdmap() override; OstreamTemp get_clog_error() override; OstreamTemp get_clog_info() override; diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index 79b668af05e..970683f8130 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -636,7 +636,7 @@ void PeeringState::start_peering_interval( psdout(10) << __func__ << ": check_new_interval output: " << debug.str() << dendl; if (new_interval) { - if (osdmap->get_epoch() == pl->oldest_stored_osdmap() && + if (osdmap->get_epoch() == pl->max_oldest_stored_osdmap() && info.history.last_epoch_clean < osdmap->get_epoch()) { psdout(10) << " map gap, clearing past_intervals and faking" << dendl; // our information is incomplete and useless; someone else was clean diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index fc7b4ef2231..56977542ceb 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -421,7 +421,6 @@ public: // ==================== Std::map notifications =================== virtual void on_active_actmap() = 0; virtual void on_active_advmap(const OSDMapRef &osdmap) = 0; - virtual epoch_t oldest_stored_osdmap() = 0; virtual epoch_t max_oldest_stored_osdmap() = 0; // ============ recovery reservation notifications ==========