]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
PeeringState: remove PG references and include
authorSamuel Just <sjust@redhat.com>
Wed, 3 Apr 2019 00:57:01 +0000 (17:57 -0700)
committersjust@redhat.com <sjust@redhat.com>
Wed, 1 May 2019 18:22:24 +0000 (11:22 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/PG.cc
src/osd/PeeringState.cc
src/osd/PeeringState.h

index f79ad47551e77e9f926bf1e65971bf16cf95893a..39c3c28d458a5d080aed5d8dda5d06ca5b0e4024 100644 (file)
@@ -184,7 +184,6 @@ PG::PG(OSDService *o, OSDMapRef curmap,
     _pool,
     curmap,
     this,
-    this,
     this),
   role(recovery_state.role),
   state(recovery_state.state),
index 0ca44372c2376cdedcaec0168299f26f9f230cf2..ded307e64b5793acf20339fcbc431160ba82105f 100644 (file)
@@ -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; \
index 26ad16c89290f8f035311f99558364e4c887510d..c63ee6972abb13da0c88e0fe9f4cfb4aeca74d69 100644 (file)
@@ -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,