]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/scrub: remove the unused should_requeue_blocked_ops() 45365/head
authorRonen Friedman <rfriedma@redhat.com>
Mon, 9 Aug 2021 10:10:52 +0000 (10:10 +0000)
committerRonen Friedman <rfriedma@redhat.com>
Sun, 13 Mar 2022 08:24:46 +0000 (08:24 +0000)
Following the change in on_applied(), should_requeue_blocked_ops() is no longer in use.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit 3c8d7f0e63bd840153e467fdfe5264fb85c518cc)

src/osd/PrimaryLogScrub.cc
src/osd/PrimaryLogScrub.h
src/osd/pg_scrubber.h
src/osd/scrub_machine_lstnr.h
src/osd/scrubber_common.h

index 1a14dbcd63f3f738de10f1a4406430068faa8d0e..37efa0a7e6e18023ee2a9b43188428c15dbef50c 100644 (file)
@@ -586,14 +586,3 @@ void PrimaryLogScrub::stats_of_handled_objects(const object_stat_sum_t& delta_st
     }
   }
 }
-
-bool PrimaryLogScrub::should_requeue_blocked_ops(eversion_t last_recovery_applied) const
-{
-  if (!is_scrub_active()) {
-    // just verify that things indeed are quiet
-    ceph_assert(m_start == m_end);
-    return false;
-  }
-
-  return last_recovery_applied >= m_subset_last_update;
-}
index 2cf0c71c300f797d5c5beb848c0485cb58412278..78353d6dbb6ff4fa2ac646eca1ee74818d0da9b5 100644 (file)
@@ -36,15 +36,6 @@ class PrimaryLogScrub : public PgScrubber {
   bool get_store_errors(const scrub_ls_arg_t& arg,
                        scrub_ls_result_t& res_inout) const final;
 
-  /**
-   *  should we requeue blocked ops?
-   *  Yes - if our 'subset_last_applied' is less up-to-date than the
-   *  new recovery_state.get_last_update_applied().
-   *  (used by PrimaryLogPG::op_applied())
-   */
-  [[nodiscard]] bool should_requeue_blocked_ops(
-    eversion_t last_recovery_applied) const final;
-
   void stats_of_handled_objects(const object_stat_sum_t& delta_stats,
                                const hobject_t& soid) final;
 
index 56b27d7848d49cc4b6338bac4c8717eb93f9e7cd..6bcc0be7313122b7142be97baa9b865bf58d0b3c 100644 (file)
@@ -290,16 +290,6 @@ class PgScrubber : public ScrubPgIF, public ScrubMachineListener {
   /// handle a message carrying a replica map
   void map_from_replica(OpRequestRef op) final;
 
-  /**
-   *  should we requeue blocked ops?
-   *  Applicable to the PrimaryLogScrub derived class.
-   */
-  [[nodiscard]] virtual bool should_requeue_blocked_ops(
-    eversion_t last_recovery_applied) const override
-  {
-    return false;
-  }
-
   void scrub_clear_state() final;
 
   /**
@@ -330,6 +320,8 @@ class PgScrubber : public ScrubPgIF, public ScrubMachineListener {
   // -------------------------------------------------------------------------------------------
   // the I/F used by the state-machine (i.e. the implementation of ScrubMachineListener)
 
+  [[nodiscard]] bool is_primary() const final { return m_pg->recovery_state.is_primary(); }
+
   bool select_range() final;
 
   /// walk the log to find the latest update that affects our chunk
@@ -398,8 +390,6 @@ class PgScrubber : public ScrubPgIF, public ScrubMachineListener {
   void state_set(uint64_t m) { m_pg->state_set(m); }
   void state_clear(uint64_t m) { m_pg->state_clear(m); }
 
-  [[nodiscard]] bool is_primary() const { return m_pg->recovery_state.is_primary(); }
-
   [[nodiscard]] bool is_scrub_registered() const;
 
   virtual void _scrub_clear_state() {}
index 2b96161215474759da1b398bae71797d0d6efe27..b4613ce46533202bc9d54415a2d9ebc017107c80 100644 (file)
@@ -49,6 +49,8 @@ struct ScrubMachineListener {
 
   virtual ~ScrubMachineListener(){};
 
+  [[nodiscard]] virtual bool is_primary() const = 0;
+
   virtual bool select_range() = 0;
 
   /// walk the log to find the latest update that affects our chunk
index ab6f84e88f54c6987493359fa45c7e9050968241..a11100d380a7b11d99bbf56104a8e3693895748a 100644 (file)
@@ -138,20 +138,6 @@ struct ScrubPgIF {
 
   virtual void send_sched_replica(epoch_t epoch_queued) = 0;
 
-//   virtual void send_full_reset(epoch_t epoch_queued) = 0;
-// 
-//   virtual void send_chunk_free(epoch_t epoch_queued) = 0;
-// 
-//   virtual void send_chunk_busy(epoch_t epoch_queued) = 0;
-// 
-//   virtual void send_local_map_done(epoch_t epoch_queued) = 0;
-// 
-//   virtual void send_get_next_chunk(epoch_t epoch_queued) = 0;
-// 
-//   virtual void send_scrub_is_finished(epoch_t epoch_queued) = 0;
-// 
-//   virtual void send_maps_compared(epoch_t epoch_queued) = 0;
-
   virtual void on_applied_when_primary(const eversion_t &applied_version) = 0;
 
   // --------------------------------------------------
@@ -206,10 +192,6 @@ struct ScrubPgIF {
 
   virtual void add_callback(Context* context) = 0;
 
-  /// should we requeue blocked ops?
-  [[nodiscard]] virtual bool should_requeue_blocked_ops(
-    eversion_t last_recovery_applied) const = 0;
-
   /// add to scrub statistics, but only if the soid is below the scrub start
   virtual void stats_of_handled_objects(const object_stat_sum_t& delta_stats,
                                        const hobject_t& soid) = 0;