From 13e116909766ca26072742f82c8fe762c1307a40 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 2 Apr 2019 17:57:01 -0700 Subject: [PATCH] PeeringState: remove PG references and include Signed-off-by: Samuel Just --- src/osd/PG.cc | 1 - src/osd/PeeringState.cc | 11 +++-------- src/osd/PeeringState.h | 10 ++-------- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/osd/PG.cc b/src/osd/PG.cc index f79ad47551e77..39c3c28d458a5 100644 --- a/src/osd/PG.cc +++ b/src/osd/PG.cc @@ -184,7 +184,6 @@ PG::PG(OSDService *o, OSDMapRef curmap, _pool, curmap, this, - this, this), role(recovery_state.role), state(recovery_state.state), diff --git a/src/osd/PeeringState.cc b/src/osd/PeeringState.cc index 0ca44372c2376..ded307e64b579 100644 --- a/src/osd/PeeringState.cc +++ b/src/osd/PeeringState.cc @@ -4,7 +4,6 @@ #include "PGPeeringEvent.h" #include "common/dout.h" #include "PeeringState.h" -#include "PG.h" #include "OSD.h" #include "messages/MOSDPGRemove.h" @@ -117,14 +116,12 @@ PeeringState::PeeringState( const PGPool &_pool, OSDMapRef curmap, DoutPrefixProvider *dpp, - PeeringListener *pl, - PG *pg) - : state_history(pg), - machine(this, cct, spgid, dpp, pl, pg, &state_history), cct(cct), + PeeringListener *pl) + : state_history(pl), + machine(this, cct, spgid, dpp, pl, &state_history), cct(cct), spgid(spgid), dpp(dpp), pl(pl), - pg(pg), orig_ctx(0), osdmap_ref(curmap), pool(_pool), @@ -2590,8 +2587,6 @@ void PeeringState::fulfill_query(const MQuery& query, PeeringCtx *rctx) #define psdout(x) ldout(context< PeeringMachine >().cct, x) #define DECLARE_LOCALS \ - PG *pg = context< PeeringMachine >().pg; \ - std::ignore = pg; \ PeeringState *ps = context< PeeringMachine >().state; \ std::ignore = ps; \ PeeringListener *pl = context< PeeringMachine >().pl; \ diff --git a/src/osd/PeeringState.h b/src/osd/PeeringState.h index 26ad16c89290f..c63ee6972abb1 100644 --- a/src/osd/PeeringState.h +++ b/src/osd/PeeringState.h @@ -22,8 +22,6 @@ #include "MissingLoc.h" #include "common/LogClient.h" -class PG; - struct PGPool { CephContext* cct; epoch_t cached_epoch; @@ -377,7 +375,6 @@ public: spg_t spgid; DoutPrefixProvider *dpp; PeeringListener *pl; - PG *pg; utime_t event_time; uint64_t event_count; @@ -395,13 +392,12 @@ public: spg_t spgid, DoutPrefixProvider *dpp, PeeringListener *pl, - PG *pg, PGStateHistory *state_history) : state(state), state_history(state_history), cct(cct), spgid(spgid), dpp(dpp), pl(pl), - pg(pg), event_count(0) {} + event_count(0) {} /* Accessor functions for state methods */ ObjectStore::Transaction* get_cur_transaction() { @@ -1139,7 +1135,6 @@ public: spg_t spgid; DoutPrefixProvider *dpp; PeeringListener *pl; - PG *pg; /// context passed in by state machine caller PeeringCtx *orig_ctx; @@ -1415,8 +1410,7 @@ public: const PGPool &pool, OSDMapRef curmap, DoutPrefixProvider *dpp, - PeeringListener *pl, - PG *pg); + PeeringListener *pl); void set_backend_predicates( IsPGReadablePredicate *is_readable, -- 2.39.5