map<hobject_t, set<pg_shard_t> > missing_loc;
set<pg_shard_t> missing_loc_sources;
PG *pg;
- boost::scoped_ptr<PGBackend::IsReadablePredicate> is_readable;
- boost::scoped_ptr<PGBackend::IsRecoverablePredicate> is_recoverable;
set<pg_shard_t> empty_set;
public:
+ boost::scoped_ptr<PGBackend::IsReadablePredicate> is_readable;
+ boost::scoped_ptr<PGBackend::IsRecoverablePredicate> is_recoverable;
MissingLoc(PG *pg)
: pg(pg) {}
void set_backend_predicates(
return ret;
}
+ const map<hobject_t, pg_missing_t::item> &get_all_missing() {
+ return needs_recovery_map;
+ }
+
void clear() {
needs_recovery_map.clear();
missing_loc.clear();
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; }
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<hobject_t, pg_missing_t::item>::const_iterator m = missing.missing.begin();
- map<hobject_t, pg_missing_t::item>::const_iterator mend = missing.missing.end();
+ map<hobject_t, pg_missing_t::item>::const_iterator m =
+ missing_loc.get_all_missing().begin();
+ map<hobject_t, pg_missing_t::item>::const_iterator mend =
+ missing_loc.get_all_missing().end();
while (m != mend) {
const hobject_t &oid(m->first);
if (!missing_loc.is_unfound(oid)) {
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;