]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Remove oldest_stored_osdmap()
authorMatan Breizman <mbreizma@redhat.com>
Thu, 3 Nov 2022 08:59:11 +0000 (08:59 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Tue, 16 May 2023 10:36:52 +0000 (10:36 +0000)
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 <mbreizma@redhat.com>
(cherry picked from commit 2541b49927670927fc34acf4af712fdb9f7a5bf7)

src/crimson/osd/pg.h
src/osd/PG.cc
src/osd/PG.h
src/osd/PeeringState.cc
src/osd/PeeringState.h

index 1bd4bbfc7744a6274e5cea99dcfd741d7017ad53..8610ba0cc5a3b013961c1ca1b21297b0cac2b6f2 100644 (file)
@@ -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
index 9f61d6471b5673e8788db45de21fd66b6a11d6fe..496c97d307857849709bde3feac9855c72334958 100644 (file)
@@ -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;
 }
index 027b3d064a01394bda1028169acd0b540bb45147..b70e0126fbe75d521b04be91bb6bcad05791ec42 100644 (file)
@@ -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;
index 37be742f9925e9515a96501a7bd7e05803babac6..88b51397bb3be4640658948719e01d30da60b4b0 100644 (file)
@@ -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
index 074ed0d88d128f725daf28f32437182aa194e03c..87fcca6fb820880e1cdd13a6b725b773fe0b917b 100644 (file)
@@ -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 ==========