summaryrefslogtreecommitdiffstats
path: root/src/osd/scrubber/osd_scrub_sched.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/scrubber/osd_scrub_sched.cc')
-rw-r--r--src/osd/scrubber/osd_scrub_sched.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/osd/scrubber/osd_scrub_sched.cc b/src/osd/scrubber/osd_scrub_sched.cc
index 8ff0d1ff7d8..c116bcbb4c2 100644
--- a/src/osd/scrubber/osd_scrub_sched.cc
+++ b/src/osd/scrubber/osd_scrub_sched.cc
@@ -86,8 +86,6 @@ std::optional<Scrub::SchedEntry> ScrubQueue::pop_ready_entry(
OSDRestrictions restrictions,
utime_t time_now)
{
- /// \todo must handle 'only_deadlined'!
-
auto eligible_filtr = [&, rst = restrictions](
const SchedEntry& e) -> bool {
return eligibility_pred(e, rst, time_now);
@@ -142,9 +140,10 @@ bool ScrubQueue::remove_entry_unlocked(spg_t pgid, scrub_level_t s_or_d)
void ScrubQueue::dump_scrubs(ceph::Formatter* f) const
{
ceph_assert(f != nullptr);
+ const auto query_time = ceph_clock_now();
f->open_array_section("scrubs");
for_each_job(
- [&f](const Scrub::SchedEntry& e) {
+ [&f, query_time](const Scrub::SchedEntry& e) {
f->open_object_section("scrub");
f->dump_stream("pgid") << e.pgid;
f->dump_stream("sched_time") << e.schedule.not_before;
@@ -153,6 +152,15 @@ void ScrubQueue::dump_scrubs(ceph::Formatter* f) const
f->dump_bool(
"forced",
e.schedule.scheduled_at == PgScrubber::scrub_must_stamp());
+
+ f->dump_stream("level") << (e.level == scrub_level_t::shallow
+ ? "shallow"
+ : "deep");
+ f->dump_stream("urgency") << fmt::format("{}", e.urgency);
+ f->dump_bool("eligible", e.schedule.not_before <= query_time);
+ f->dump_bool("overdue", e.schedule.deadline < query_time);
+ f->dump_stream("last_issue") << fmt::format("{}", e.last_issue);
+
f->close_section();
},
std::numeric_limits<int>::max());