As ScrubResources is no longer involved in remote reservations, some
of the data listed by 'dump_scrub_reservations' is now collected by
OsdScrub itself (prior to this change, OsdScrub just forwarded the
request to ScrubResources).
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
f->close_section();
} else if (prefix == "dump_scrub_reservations") {
f->open_object_section("scrub_reservations");
- service.get_scrub_services().resource_bookkeeper().dump_scrub_reservations(f);
+ service.get_scrub_services().dump_scrub_reservations(f);
f->close_section();
} else if (prefix == "get_latest_osdmap") {
get_latest_osdmap();
m_queue.dump_scrubs(f);
}
+void OsdScrub::dump_scrub_reservations(ceph::Formatter* f) const
+{
+ m_resource_bookkeeper.dump_scrub_reservations(f);
+ f->open_array_section("remote_scrub_reservations");
+ m_osd_svc.get_scrub_reserver().dump(f);
+ f->close_section();
+}
+
void OsdScrub::log_fwd(std::string_view text)
{
dout(20) << text << dendl;
void dump_scrubs(ceph::Formatter* f) const; ///< fwd to the queue
+ void dump_scrub_reservations(ceph::Formatter* f) const;
+
/**
* on_config_change() (the refactored "OSD::sched_all_scrubs()")
*
// clang-format on
#include <optional>
+#include "common/AsyncReserver.h"
#include "utime.h"
#include "osd/scrubber/scrub_job.h"
#include "osd/PG.h"
*/
virtual std::optional<PGLockWrapper> get_locked_pg(spg_t pgid) = 0;
+ /**
+ * allow access to the scrub_reserver, the AsyncReserver that keeps track
+ * of 'remote replica reservations'.
+ */
+ virtual AsyncReserver<spg_t, Finisher>& get_scrub_reserver() = 0;
+
virtual ~ScrubSchedListener() {}
};