]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
sd/scrub: preemption_data_t needs not keep a PG ref
authorRonen Friedman <rfriedma@redhat.com>
Thu, 27 Mar 2025 16:36:44 +0000 (11:36 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Tue, 1 Apr 2025 04:37:35 +0000 (23:37 -0500)
Removing the PG* from PgScrubber::preemption_data_t.
Mainly - to simplify the creation of unit-tests for the
PgScrubber class.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/osd/scrubber/pg_scrubber.cc
src/osd/scrubber/pg_scrubber.h

index 0a218098f888522c40f3cb226fd82d0a786614d1..8d150b2c9d4a69f026e35237b976bfdd7ca7e372 100644 (file)
@@ -2795,7 +2795,7 @@ void PgScrubber::update_scrub_stats(ceph::coarse_real_clock::time_point now_is)
 
 // ///////////////////// preemption_data_t //////////////////////////////////
 
-PgScrubber::preemption_data_t::preemption_data_t(PG* pg) : m_pg{pg},
+PgScrubber::preemption_data_t::preemption_data_t(PG* pg) :
   osd_scrub_max_preemptions{pg->cct->_conf, "osd_scrub_max_preemptions"}
 {
   m_left = *osd_scrub_max_preemptions;
index 4073203d8411689d9944b56489e234ef051fe28f..d6c686e3ac4f58a891a2688db4ac0997cc053bf5 100644 (file)
@@ -1005,7 +1005,6 @@ class PgScrubber : public ScrubPgIF,
     }
 
    private:
-    PG* m_pg;
     mutable ceph::mutex m_preemption_lock = ceph::make_mutex("preemption_lock");
     bool m_preemptable{false};
     bool m_preempted{false};