_pool.id,
p.shard),
map_lock("PG::map_lock"),
- osdmap_ref(curmap), last_persisted_osdmap_ref(curmap), pool(_pool),
+ osdmap_ref(curmap), pool(_pool),
_lock("PG::_lock"),
ref(0),
#ifdef PG_DEBUG_REFS
acting_features(CEPH_FEATURES_SUPPORTED_DEFAULT),
upacting_features(CEPH_FEATURES_SUPPORTED_DEFAULT),
do_sort_bitwise(false),
- last_epoch(0)
+ last_epoch(0),
+ last_persisted_epoch(curmap->get_epoch())
{
#ifdef PG_DEBUG_REFS
osd->add_pgid(p, this);
assert(ret == 0);
if (need_update_epoch)
last_epoch = get_osdmap()->get_epoch();
- last_persisted_osdmap_ref = osdmap_ref;
+ last_persisted_epoch = last_epoch;
dirty_info = false;
dirty_big_info = false;
dout(10) << "handle_activate_map " << dendl;
ActMap evt;
recovery_state.handle_event(evt, rctx);
- if (osdmap_ref->get_epoch() - last_persisted_osdmap_ref->get_epoch() >
+ if (osdmap_ref->get_epoch() - last_persisted_epoch >
cct->_conf->osd_pg_epoch_persisted_max_stale) {
dout(20) << __func__ << ": Dirtying info: last_persisted is "
- << last_persisted_osdmap_ref->get_epoch()
+ << last_persisted_epoch
<< " while current is " << osdmap_ref->get_epoch() << dendl;
dirty_info = true;
} else {
dout(20) << __func__ << ": Not dirtying info: last_persisted is "
- << last_persisted_osdmap_ref->get_epoch()
+ << last_persisted_epoch
<< " while current is " << osdmap_ref->get_epoch() << dendl;
}
if (osdmap_ref->check_new_blacklist_entries()) check_blacklisted_watchers();
Mutex map_lock;
list<OpRequestRef> waiting_for_map;
OSDMapRef osdmap_ref;
- OSDMapRef last_persisted_osdmap_ref;
PGPool pool;
void queue_op(OpRequestRef& op);
bool do_sort_bitwise;
epoch_t last_epoch;
+ epoch_t last_persisted_epoch;
public:
const spg_t& get_pgid() const { return pg_id; }