From: Samuel Just Date: Thu, 9 Feb 2023 20:45:25 +0000 (-0800) Subject: osd/scrubber: make PgScrubber::check_interval const X-Git-Tag: v19.0.0~1389^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b883af38a3d1ab69706c37b1d45fef60e0f8995f;p=ceph.git osd/scrubber: make PgScrubber::check_interval const Signed-off-by: Samuel Just --- diff --git a/src/osd/scrubber/pg_scrubber.cc b/src/osd/scrubber/pg_scrubber.cc index f502482afc89..93ed71304182 100644 --- a/src/osd/scrubber/pg_scrubber.cc +++ b/src/osd/scrubber/pg_scrubber.cc @@ -89,7 +89,7 @@ ostream& operator<<(ostream& out, const requested_scrub_t& sf) * PrimaryLogPG::on_change() was called when that interval ended. We can safely * discard the stale message. */ -bool PgScrubber::check_interval(epoch_t epoch_to_verify) +bool PgScrubber::check_interval(epoch_t epoch_to_verify) const { return epoch_to_verify >= m_pg->get_same_interval_since(); } diff --git a/src/osd/scrubber/pg_scrubber.h b/src/osd/scrubber/pg_scrubber.h index 3a3fd154a177..5243927c372e 100644 --- a/src/osd/scrubber/pg_scrubber.h +++ b/src/osd/scrubber/pg_scrubber.h @@ -728,7 +728,7 @@ class PgScrubber : public ScrubPgIF, */ [[nodiscard]] bool verify_against_abort(epoch_t epoch_to_verify); - [[nodiscard]] bool check_interval(epoch_t epoch_to_verify); + [[nodiscard]] bool check_interval(epoch_t epoch_to_verify) const; epoch_t m_last_aborted{}; // last time we've noticed a request to abort