From 39d1a3fbce9f8f0c5539a64899def036b2f51fc8 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Sun, 31 Mar 2013 00:00:27 -0700 Subject: [PATCH] PG: pass authoritative scrub map to _scrub Signed-off-by: Samuel Just --- src/osd/PG.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 242b6fcfddd..4c24b6a9709 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() {