From: Ronen Friedman Date: Mon, 9 Aug 2021 10:10:52 +0000 (+0000) Subject: osd/scrub: remove the unused should_requeue_blocked_ops() X-Git-Tag: v16.2.8~116^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F45365%2Fhead;p=ceph.git osd/scrub: remove the unused should_requeue_blocked_ops() Following the change in on_applied(), should_requeue_blocked_ops() is no longer in use. Signed-off-by: Ronen Friedman (cherry picked from commit 3c8d7f0e63bd840153e467fdfe5264fb85c518cc) --- diff --git a/src/osd/PrimaryLogScrub.cc b/src/osd/PrimaryLogScrub.cc index 1a14dbcd63f3..37efa0a7e6e1 100644 --- a/src/osd/PrimaryLogScrub.cc +++ b/src/osd/PrimaryLogScrub.cc @@ -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; -} diff --git a/src/osd/PrimaryLogScrub.h b/src/osd/PrimaryLogScrub.h index 2cf0c71c300f..78353d6dbb6f 100644 --- a/src/osd/PrimaryLogScrub.h +++ b/src/osd/PrimaryLogScrub.h @@ -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; diff --git a/src/osd/pg_scrubber.h b/src/osd/pg_scrubber.h index 56b27d7848d4..6bcc0be73131 100644 --- a/src/osd/pg_scrubber.h +++ b/src/osd/pg_scrubber.h @@ -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() {} diff --git a/src/osd/scrub_machine_lstnr.h b/src/osd/scrub_machine_lstnr.h index 2b9616121547..b4613ce46533 100644 --- a/src/osd/scrub_machine_lstnr.h +++ b/src/osd/scrub_machine_lstnr.h @@ -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 diff --git a/src/osd/scrubber_common.h b/src/osd/scrubber_common.h index ab6f84e88f54..a11100d380a7 100644 --- a/src/osd/scrubber_common.h +++ b/src/osd/scrubber_common.h @@ -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;