pg: report scrub status

Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
This commit is contained in:
Mike Ryan 2012-06-27 14:14:30 -07:00
parent c94583e500
commit f366173927

View File

@ -4319,6 +4319,20 @@ boost::statechart::result PG::RecoveryState::Active::react(const QueryState& q)
q.f->close_section();
}
q.f->open_object_section("scrub");
q.f->dump_stream("scrub_epoch_start") << pg->scrub_epoch_start;
q.f->dump_int("scrub_active", pg->scrub_active);
q.f->dump_int("scrub_block_writes", pg->scrub_block_writes);
q.f->dump_int("finalizing_scrub", pg->finalizing_scrub);
q.f->dump_int("scrub_waiting_on", pg->scrub_waiting_on);
q.f->open_array_section("scrub_waiting_on_whom");
for (set<int>::iterator p = pg->scrub_waiting_on_whom.begin();
p != pg->scrub_waiting_on_whom.end();
++p) {
q.f->dump_int("osd", *p);
}
q.f->close_section();
q.f->close_section();
return forward_event();
}
@ -4398,9 +4412,12 @@ boost::statechart::result PG::RecoveryState::ReplicaActive::react(const MQuery&
boost::statechart::result PG::RecoveryState::ReplicaActive::react(const QueryState& q)
{
PG *pg = context< RecoveryMachine >().pg;
q.f->open_object_section("state");
q.f->dump_string("name", state_name);
q.f->dump_stream("enter_time") << enter_time;
q.f->dump_int("finalizing_scrub", pg->finalizing_scrub);
q.f->close_section();
return forward_event();
}