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>
// ///////////////////// 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;
}
private:
- PG* m_pg;
mutable ceph::mutex m_preemption_lock = ceph::make_mutex("preemption_lock");
bool m_preemptable{false};
bool m_preempted{false};