}
+Objecter::PG &Objecter::get_pg(pg_t pgid)
+{
+ if (!pg_map.count(pgid)) {
+ osdmap->pg_to_acting_osds(pgid, pg_map[pgid].acting);
+ dout(10) << "get_pg " << pgid << " is new, " << pg_map[pgid].acting << dendl;
+ } else {
+ dout(10) << "get_pg " << pgid << " is old, " << pg_map[pgid].acting << dendl;
+ }
+ return pg_map[pgid];
+}
+
void Objecter::scan_pgs(set<pg_t>& changed_pgs)
{
if (other == pg.acting)
continue; // no change.
+
+ dout(10) << "scan_pgs " << pgid << " " << pg.acting << " -> " << other << dendl;
other.swap(pg.acting);
hash_map<pg_t,PG> pg_map;
- PG &get_pg(pg_t pgid) {
- if (!pg_map.count(pgid))
- osdmap->pg_to_acting_osds(pgid, pg_map[pgid].acting);
- return pg_map[pgid];
- }
+ PG &get_pg(pg_t pgid);
void close_pg(pg_t pgid) {
assert(pg_map.count(pgid));
assert(pg_map[pgid].active_tids.empty());