m_osds->sleep_timer.cancel_event(token);
}
+LogChannelRef &PgScrubber::get_clog() const
+{
+ return m_osds->clog;
+}
+
+int PgScrubber::get_whoami() const
+{
+ return m_osds->whoami;
+}
+
/*
* The selected range is set directly into 'm_start' and 'm_end'
* setting:
// the I/F used by the state-machine (i.e. the implementation of
// ScrubMachineListener)
+ CephContext* get_cct() const final { return m_pg->cct; }
+ LogChannelRef &get_clog() const final;
+ int get_whoami() const final;
+ spg_t get_spgid() const final { return m_pg->get_pgid(); }
+
scrubber_callback_cancel_token_t schedule_callback_after(
ceph::timespan duration, scrubber_callback_t &&cb);
} // namespace Scrub
struct ScrubMachineListener {
+ virtual CephContext *get_cct() const = 0;
+ virtual LogChannelRef &get_clog() const = 0;
+ virtual int get_whoami() const = 0;
+ virtual spg_t get_spgid() const = 0;
+
using scrubber_callback_t = std::function<void(void)>;
using scrubber_callback_cancel_token_t = Context*;