if (pending_creatings.last_scan_epoch > inc.epoch) {
return pending_creatings;
}
- const auto& pgm = mon->pgmon()->pg_map;
+ const auto& pgm = mon->pgservice.get_pg_map();
if (pgm.last_pg_scan >= creating_pgs.last_scan_epoch) {
// TODO: please stop updating pgmap with pgstats once the upgrade is completed
const unsigned total = pending_creatings.pgs.size();
if (osdmap.require_osd_release < CEPH_RELEASE_LUMINOUS) {
dout(7) << __func__ << " in the middle of upgrading, "
<< " trimming pending creating_pgs using pgmap" << dendl;
- trim_creating_pgs(&pending_creatings, mon->pgmon()->pg_map);
+ trim_creating_pgs(&pending_creatings, mon->pgservice.get_pg_map());
}
bufferlist creatings_bl;
::encode(pending_creatings, creatings_bl);
}
map<int, float> full, backfillfull, nearfull;
- osdmap.get_full_osd_util(mon->pgmon()->pg_map.osd_stat, &full, &backfillfull, &nearfull);
+ osdmap.get_full_osd_util(mon->pgservice.get_pg_map().osd_stat, &full, &backfillfull, &nearfull);
if (full.size()) {
ostringstream ss;
ss << full.size() << " full osd(s)";
bool OSDMonitor::update_pools_status()
{
- if (!mon->pgmon()->is_readable())
+ if (!mon->pgservice.is_readable())
return false;
bool ret = false;
string out_str;
mempool::osdmap::map<int32_t, uint32_t> new_weights;
err = reweight::by_utilization(osdmap,
- mon->pgmon()->pg_map,
+ mon->pgservice.get_pg_map(),
oload,
max_change,
max_osds,