pending_inc.version = pg_map.version + 1; // to make apply_incremental happy
PGMapUpdater::check_osd_map(g_ceph_context, osd_map, pg_map, &pending_inc);
- PGMapUpdater::update_creating_pgs(osd_map, pg_map, &pending_inc);
- PGMapUpdater::register_new_pgs(osd_map, pg_map, &pending_inc);
// brute force this for now (don't bother being clever by only
// checking osds that went up/down)
}
}
}
+
+ // deleted pgs (pools)?
for (auto& p : pgmap.pg_pool_sum) {
if (!osdmap.have_pg_pool(p.first)) {
ldout(cct, 10) << __func__ << " pool " << p.first << " gone, removing pgs"
}
}
}
+
+ // new pgs (split or new pool)?
+ for (auto& p : osdmap.get_pools()) {
+ int64_t poolid = p.first;
+ const pg_pool_t& pi = p.second;
+ auto q = pgmap.num_pg_by_pool.find(poolid);
+ unsigned my_pg_num = 0;
+ if (q != pgmap.num_pg_by_pool.end())
+ my_pg_num = q->second;
+ unsigned pg_num = pi.get_pg_num();
+ if (my_pg_num != pg_num) {
+ for (unsigned ps = my_pg_num; ps < pg_num; ++ps) {
+ pg_t pgid(ps, poolid);
+ if (pending_inc->pg_stat_updates.count(pgid) == 0) {
+ pg_stat_t &stats = pending_inc->pg_stat_updates[pgid];
+ stats.last_fresh = osdmap.get_modified();
+ stats.last_active = osdmap.get_modified();
+ stats.last_change = osdmap.get_modified();
+ stats.last_peered = osdmap.get_modified();
+ stats.last_clean = osdmap.get_modified();
+ stats.last_unstale = osdmap.get_modified();
+ stats.last_undegraded = osdmap.get_modified();
+ stats.last_fullsized = osdmap.get_modified();
+ stats.last_scrub_stamp = osdmap.get_modified();
+ stats.last_deep_scrub_stamp = osdmap.get_modified();
+ stats.last_clean_scrub_stamp = osdmap.get_modified();
+ }
+ }
+ }
+ }
}
void PGMapUpdater::register_pg(