From: Sage Weil Date: Mon, 15 May 2017 21:45:06 +0000 (-0400) Subject: mon/PGMonitor: link PGStatService to the actual PGMap X-Git-Tag: ses5-milestone6~8^2~19^2~95 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7df32d115908ad12dbd6a015125662caa3a2da7f;p=ceph.git mon/PGMonitor: link PGStatService to the actual PGMap Signed-off-by: Sage Weil --- diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index 15e22daebe8..c7b3e2258da 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -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(this)), pgmon(nullptr) {} - PGMapStatService(const PGMap& o, - PGMonitor *pgm) : PGMap(o), PGStatService(), - parent(*static_cast(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(); }