mirror of
https://github.com/ceph/ceph
synced 2024-12-29 06:52:35 +00:00
OSD: Initialize pool and recovery_state in the order they are defined
Currently we call get_pool on the PeeringState before the PeeringState has been initialized. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
This commit is contained in:
parent
975fafed35
commit
6248c40d54
@ -176,7 +176,6 @@ PG::PG(OSDService *o, OSDMapRef curmap,
|
||||
coll(p),
|
||||
osd(o),
|
||||
cct(o->cct),
|
||||
pool(recovery_state.get_pool()),
|
||||
osdriver(osd->store, coll_t(), OSD::make_snapmapper_oid()),
|
||||
snap_mapper(
|
||||
cct,
|
||||
@ -208,6 +207,7 @@ PG::PG(OSDService *o, OSDMapRef curmap,
|
||||
curmap,
|
||||
this,
|
||||
this),
|
||||
pool(recovery_state.get_pool()),
|
||||
info(recovery_state.get_info())
|
||||
{
|
||||
#ifdef PG_DEBUG_REFS
|
||||
|
@ -595,8 +595,6 @@ public:
|
||||
protected:
|
||||
CephContext *cct;
|
||||
|
||||
const PGPool &pool;
|
||||
|
||||
// locking and reference counting.
|
||||
// I destroy myself when the reference count hits zero.
|
||||
// lock() should be called before doing anything.
|
||||
@ -1488,9 +1486,10 @@ protected:
|
||||
protected:
|
||||
PeeringState recovery_state;
|
||||
|
||||
/**
|
||||
* Ref to pg_info_t in Peering state
|
||||
*/
|
||||
// ref to recovery_state.pool
|
||||
const PGPool &pool;
|
||||
|
||||
// ref to recovery_state.info
|
||||
const pg_info_t &info;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user