From: Samuel Just Date: Sun, 31 Mar 2013 07:00:27 +0000 (-0700) Subject: PG: pass authoritative scrub map to _scrub X-Git-Tag: v0.62~113^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=39d1a3fbce9f8f0c5539a64899def036b2f51fc8;p=ceph.git PG: pass authoritative scrub map to _scrub Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 242b6fcfddd0..4c24b6a97098 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -4371,6 +4371,10 @@ void PG::_compare_scrubmaps(const map &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::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() {