From: Samuel Just Date: Tue, 22 Apr 2014 21:56:08 +0000 (-0700) Subject: ReplicatedPG: handle ec pools in mark_all_unfound_lost X-Git-Tag: v0.80~23^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2182815c67d50d5365bb92af97edbbaae44fdad8;p=ceph.git ReplicatedPG: handle ec pools in mark_all_unfound_lost Signed-off-by: Samuel Just --- diff --git a/src/osd/PG.h b/src/osd/PG.h index 58585dfe12c..4f9bc444098 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -309,10 +309,10 @@ public: map > missing_loc; set missing_loc_sources; PG *pg; - boost::scoped_ptr is_readable; - boost::scoped_ptr is_recoverable; set empty_set; public: + boost::scoped_ptr is_readable; + boost::scoped_ptr is_recoverable; MissingLoc(PG *pg) : pg(pg) {} void set_backend_predicates( @@ -353,6 +353,10 @@ public: return ret; } + const map &get_all_missing() { + return needs_recovery_map; + } + void clear() { needs_recovery_map.clear(); missing_loc.clear(); diff --git a/src/osd/PGLog.h b/src/osd/PGLog.h index 9309841326d..f793cbdf57d 100644 --- a/src/osd/PGLog.h +++ b/src/osd/PGLog.h @@ -283,6 +283,10 @@ public: missing.rm(p); } + void missing_add_event(const pg_log_entry_t &e) { + missing.add_next_event(e); + } + //////////////////// get or set log //////////////////// const IndexedLog &get_log() const { return log; } diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index c6a8d3e7f68..d80661cc459 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -8853,8 +8853,10 @@ void ReplicatedPG::mark_all_unfound_lost(int what) utime_t mtime = ceph_clock_now(cct); info.last_update.epoch = get_osdmap()->get_epoch(); const pg_missing_t &missing = pg_log.get_missing(); - map::const_iterator m = missing.missing.begin(); - map::const_iterator mend = missing.missing.end(); + map::const_iterator m = + missing_loc.get_all_missing().begin(); + map::const_iterator mend = + missing_loc.get_all_missing().end(); while (m != mend) { const hobject_t &oid(m->first); if (!missing_loc.is_unfound(oid)) { @@ -8906,7 +8908,8 @@ void ReplicatedPG::mark_all_unfound_lost(int what) t->remove( coll, ghobject_t(oid, ghobject_t::NO_GEN, pg_whoami.shard)); - pg_log.missing_rm(m++); + pg_log.missing_add_event(e); + ++m; missing_loc.recovered(oid); } break;