From: Sage Weil Date: Tue, 27 Mar 2012 22:02:51 +0000 (-0700) Subject: osd: maintain missing_loc_sources X-Git-Tag: v0.45~30^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1ee608733d2974ae95cfbfba224e30ae60f3dc9b;p=ceph.git osd: maintain missing_loc_sources This is a superset of all missing_loc values... everywhere we might pull an object from, or are currently pulling from. Initially it's the union, but as missing_loc shrinks it may contain peers that are no longer in missing_loc. Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.cc b/src/osd/PG.cc index 1516fe205559..35d30f730244 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -556,6 +556,7 @@ bool PG::search_for_missing(const pg_info_t &oinfo, const pg_missing_t *omissing } stats_updated = true; missing_loc[soid].insert(fromosd); + missing_loc_sources.insert(fromosd); } else { ml->second.insert(fromosd); @@ -894,6 +895,8 @@ void PG::clear_primary_state() finish_sync_event = 0; // so that _finish_recvoery doesn't go off in another thread missing_loc.clear(); + missing_loc_sources.clear(); + log.reset_recovery_pointers(); scrub_reserved_peers.clear(); @@ -2811,6 +2814,7 @@ void PG::repair_object(const hobject_t& soid, ScrubMap::object *po, int bad_peer missing.add(soid, oi.version, eversion_t()); missing_loc[soid].insert(ok_peer); + missing_loc_sources.insert(ok_peer); log.last_requested = 0; } diff --git a/src/osd/PG.h b/src/osd/PG.h index 8d56ddeec8f9..9f50ed313660 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -459,6 +459,7 @@ public: OndiskLog ondisklog; pg_missing_t missing; map > missing_loc; + set missing_loc_sources; // superset of missing_loc locations interval_set snap_collections; map past_intervals;