* New OSD daemon command dump_recovery_reservations which reveals the
recovery locks held (in_progress) and waiting in priority queues.
+
+* New OSD daemon command dump_scrub_reservations which reveals the
+ scrub reservations that are active and pending.
ceph_assert(scrubs_active >= 0);
}
+void OSDService::dump_scrub_reservations(Formatter *f)
+{
+ std::lock_guard l{sched_scrub_lock};
+ f->dump_int("scrubs_active", scrubs_active);
+ f->dump_int("scrubs_pending", scrubs_pending);
+ f->dump_int("osd_max_scrubs", cct->_conf->osd_max_scrubs);
+}
+
void OSDService::retrieve_epochs(epoch_t *_boot_epoch, epoch_t *_up_epoch,
epoch_t *_bind_epoch) const
{
service.remote_reserver.dump(f);
f->close_section();
f->close_section();
+ } else if (admin_command == "dump_scrub_reservations") {
+ f->open_object_section("scrub_reservations");
+ service.dump_scrub_reservations(f);
+ f->close_section();
} else if (admin_command == "get_latest_osdmap") {
get_latest_osdmap();
} else if (admin_command == "heap") {
asok_hook,
"show recovery reservations");
ceph_assert(r == 0);
+ r = admin_socket->register_command("dump_scrub_reservations", "dump_scrub_reservations",
+ asok_hook,
+ "show scrub reservations");
+ ceph_assert(r == 0);
r = admin_socket->register_command("get_latest_osdmap", "get_latest_osdmap",
asok_hook,
"force osd to update the latest map from "
void inc_scrubs_active(bool reserved);
void dec_scrubs_pending();
void dec_scrubs_active();
+ void dump_scrub_reservations(Formatter *f);
void reply_op_error(OpRequestRef op, int err);
void reply_op_error(OpRequestRef op, int err, eversion_t v, version_t uv);