Skip to content

Commit 345911e

Browse files
committed
sd/scrub: preemption_data_t needs not keep a PG ref
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 <[email protected]>
1 parent fa37364 commit 345911e

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/osd/scrubber/pg_scrubber.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2795,7 +2795,7 @@ void PgScrubber::update_scrub_stats(ceph::coarse_real_clock::time_point now_is)
27952795

27962796
// ///////////////////// preemption_data_t //////////////////////////////////
27972797

2798-
PgScrubber::preemption_data_t::preemption_data_t(PG* pg) : m_pg{pg},
2798+
PgScrubber::preemption_data_t::preemption_data_t(PG* pg) :
27992799
osd_scrub_max_preemptions{pg->cct->_conf, "osd_scrub_max_preemptions"}
28002800
{
28012801
m_left = *osd_scrub_max_preemptions;

src/osd/scrubber/pg_scrubber.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1005,7 +1005,6 @@ class PgScrubber : public ScrubPgIF,
10051005
}
10061006

10071007
private:
1008-
PG* m_pg;
10091008
mutable ceph::mutex m_preemption_lock = ceph::make_mutex("preemption_lock");
10101009
bool m_preemptable{false};
10111010
bool m_preempted{false};

0 commit comments

Comments
 (0)