PG::PG(OSDService *o, OSDMapRef curmap,
const PGPool &_pool, spg_t p) :
- pg_whoami(osd->whoami, p.shard),
+ pg_whoami(o->whoami, p.shard),
pg_id(p),
- recovery_state(
- cct,
- pg_whoami,
- p,
- _pool,
- curmap,
- this,
- this),
- info(recovery_state.get_info()),
coll(p),
osd(o),
cct(o->cct),
finish_sync_event(NULL),
backoff_lock("PG::backoff_lock"),
scrub_after_recovery(false),
- active_pushes(0)
+ active_pushes(0),
+ recovery_state(
+ o->cct,
+ pg_whoami,
+ p,
+ _pool,
+ curmap,
+ this,
+ this),
+ info(recovery_state.get_info())
{
#ifdef PG_DEBUG_REFS
osd->add_pgid(p, this);
public:
const pg_shard_t pg_whoami;
const spg_t pg_id;
- PeeringState recovery_state;
using PeeringCtx = PeeringState::PeeringCtx;
-protected:
- /**
- * Ref to pg_info_t in Peering state
- */
- const pg_info_t &info;
-
public:
// -- members --
const coll_t coll;
friend class FlushState;
friend ostream& operator<<(ostream& out, const PG& pg);
+
+protected:
+ PeeringState recovery_state;
+
+ /**
+ * Ref to pg_info_t in Peering state
+ */
+ const pg_info_t &info;
};
DoutPrefixProvider *dpp,
PeeringListener *pl)
: state_history(pl),
- machine(this, cct, spgid, dpp, pl, &state_history), cct(cct),
+ cct(cct),
spgid(spgid),
dpp(dpp),
pl(pl),
pg_whoami(pg_whoami),
info(spgid),
pg_log(cct),
- missing_loc(spgid, this, dpp, cct)
+ missing_loc(spgid, this, dpp, cct),
+ machine(this, cct, spgid, dpp, pl, &state_history)
{
machine.initiate();
}
};
PGStateHistory state_history;
- PeeringMachine machine;
CephContext* cct;
spg_t spgid;
DoutPrefixProvider *dpp;
bool backfill_reserved = false;
bool backfill_reserving = false;
+ PeeringMachine machine;
+
void update_osdmap_ref(OSDMapRef newmap) {
osdmap_ref = std::move(newmap);
}