const OSDMap& next,
pg_t pgid)
{
- PGMap *pg_map = &mon->pgmon()->pg_map; // FIMXE: use new creating_pgs map
- if (!pg_map->creating_pgs.count(pgid)) {
+ if (!creating_pgs.pgs.count(pgid)) {
return;
}
version_t OSDMonitor::get_trim_to()
{
- if (mon->pgmon()->is_readable() &&
- mon->pgmon()->pg_map.creating_pgs.empty()) {
+ {
+ std::lock_guard<Spinlock> l(creating_pgs_lock);
+ if (!creating_pgs.pgs.empty()) {
+ return 0;
+ }
+ }
+ if (mon->pgmon()->is_readable()) {
epoch_t floor = mon->pgmon()->pg_map.get_min_last_epoch_clean();
dout(10) << " min_last_epoch_clean " << floor << dendl;
if (g_conf->mon_osd_force_trim_to > 0 &&