From: Matan Breizman Date: Thu, 3 Nov 2022 08:59:11 +0000 (+0000) Subject: osd: Remove oldest_stored_osdmap() X-Git-Tag: v17.2.7~393^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0d52451b2dbd98b934badd555ed381459a46b45b;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 (cherry picked from commit 2541b49927670927fc34acf4af712fdb9f7a5bf7) --- diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index 1bd4bbfc774..8610ba0cc5a 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -346,10 +346,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 9f61d6471b5..496c97d3078 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -1625,10 +1625,6 @@ void PG::on_new_interval() m_scrubber->on_maybe_registration_change(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 027b3d064a0..b70e0126fbe 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -590,7 +590,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 37be742f992..88b51397bb3 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 074ed0d88d1..87fcca6fb82 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -404,7 +404,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 ==========