<< ", start " << h
<< dendl;
- for (epoch_t e = osdmap->get_epoch();
+ epoch_t e;
+ for (e = osdmap->get_epoch();
e > from;
e--) {
// verify during intermediate epoch (e-1)
break;
}
+ // base case: these floors should be the creation epoch if we didn't
+ // find any changes.
+ if (e == h.epoch_created) {
+ if (!h.same_acting_since)
+ h.same_acting_since = e;
+ if (!h.same_up_since)
+ h.same_up_since = e;
+ if (!h.same_primary_since)
+ h.same_primary_since = e;
+ }
+
dout(15) << "project_pg_history end " << h << dendl;
}
// figure history
PG::Info::History history;
+ history.epoch_created = created;
+ history.last_epoch_clean = created;
project_pg_history(pgid, history, created, up, acting);
// register.
}
epoch_t first_epoch = 0;
- epoch_t stop = MAX(1, info.history.last_epoch_clean);
+ epoch_t stop = MAX(info.history.epoch_created, info.history.last_epoch_clean);
epoch_t last_epoch = info.history.same_acting_since - 1;
dout(10) << __func__ << " over epochs " << stop << "-" << last_epoch << dendl;