PG: pass authoritative scrub map to _scrub

Signed-off-by: Samuel Just <sam.just@inktank.com>
This commit is contained in:
Samuel Just 2013-03-31 00:00:27 -07:00
parent a838965ca3
commit 39d1a3fbce

View File

@ -4371,6 +4371,10 @@ void PG::_compare_scrubmaps(const map<int,ScrubMap*> &maps,
void PG::scrub_compare_maps() {
dout(10) << "scrub_compare_maps has maps, analyzing" << dendl;
// construct authoritative scrub map for type specific scrubbing
ScrubMap authmap(scrubber.primary_scrubmap);
if (acting.size() > 1) {
dout(10) << "scrub comparing replica scrub maps" << dendl;
@ -4410,10 +4414,17 @@ void PG::scrub_compare_maps() {
i->first,
make_pair(maps[i->second]->objects[i->first], i->second)));
}
for (map<hobject_t, int>::iterator i = authoritative.begin();
i != authoritative.end();
++i) {
authmap.objects.erase(i->first);
authmap.objects.insert(*(maps[i->second]->objects.find(i->first)));
}
}
// ok, do the pg-type specific scrubbing
_scrub(scrubber.primary_scrubmap);
_scrub(authmap);
}
void PG::scrub_process_inconsistent() {