]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMonitor: link PGStatService to the actual PGMap
authorSage Weil <sage@redhat.com>
Mon, 15 May 2017 21:45:06 +0000 (17:45 -0400)
committerSage Weil <sage@redhat.com>
Fri, 2 Jun 2017 17:02:09 +0000 (13:02 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/PGMonitor.cc

index 15e22daebe857d1ce70f2c2b5d1ef1f27b10584a..c7b3e2258da2a27b18f51f65433db0866dcd8d34 100644 (file)
@@ -1671,19 +1671,13 @@ bool PGMonitor::check_sub(Subscription *sub)
   }
   return true;
 }
-class PGMapStatService : public PGMap, public PGStatService {
-  PGMap& parent;
+class PGMapStatService : public PGStatService {
+  const PGMap& parent;
   PGMonitor *pgmon;
 public:
-  PGMapStatService() : PGMap(), PGStatService(),
-                      parent(*static_cast<PGMap*>(this)), pgmon(nullptr) {}
-  PGMapStatService(const PGMap& o,
-                  PGMonitor *pgm) : PGMap(o), PGStatService(),
-                                    parent(*static_cast<PGMap*>(this)),
-                                    pgmon(pgm) {}
-  void reset(const PGMap& o) {
-    parent = o;
-  }
+  PGMapStatService(const PGMap& o, PGMonitor *pgm)
+    : parent(o),
+      pgmon(pgm) {}
 
   bool is_readable() const { return pgmon->is_readable(); }