Signed-off-by: Guang Yang <yguang@yahoo-inc.com>
_scrub(authmap, missing_digest);
}
-void PG::scrub_process_inconsistent()
+bool PG::scrub_process_inconsistent()
{
dout(10) << __func__ << ": checking authoritative" << dendl;
bool repair = state_test(PG_STATE_REPAIR);
}
}
}
+ return (!scrubber.authoritative.empty() && repair);
}
// the part that actually finalizes a scrub
// type-specific finish (can tally more errors)
_scrub_finish();
- scrub_process_inconsistent();
+ bool has_error = scrub_process_inconsistent();
{
stringstream oss;
}
- if (repair) {
+ if (has_error) {
queue_peering_event(
CephPeeringEvtRef(
new CephPeeringEvt(
void scrub(epoch_t queued, ThreadPool::TPHandle &handle);
void chunky_scrub(ThreadPool::TPHandle &handle);
void scrub_compare_maps();
- void scrub_process_inconsistent();
+ /**
+ * return true if any inconsistency/missing is repaired, false otherwise
+ */
+ bool scrub_process_inconsistent();
void scrub_finish();
void scrub_clear_state();
void _scan_snaps(ScrubMap &map);