#include "MgrMap.h"
#include "PaxosService.h"
-class PGStatService;
+class MonPGStatService;
class MgrMonitor: public PaxosService
{
#include "messages/MStatfs.h"
#include "messages/MStatfsReply.h"
-class MgrPGStatService : public PGStatService {
+class MgrPGStatService : public MonPGStatService {
PGMapDigest& digest;
public:
MgrPGStatService(PGMapDigest& d) : digest(d) {}
MgrStatMonitor::~MgrStatMonitor() = default;
-PGStatService *MgrStatMonitor::get_pg_stat_service()
+MonPGStatService *MgrStatMonitor::get_pg_stat_service()
{
return pgservice.get();
}
#include "PaxosService.h"
#include "mon/PGMap.h"
-class PGStatService;
+class MonPGStatService;
class MgrPGStatService;
class MgrStatMonitor : public PaxosService {
void print_summary(Formatter *f, std::ostream *ss) const;
- PGStatService *get_pg_stat_service();
+ MonPGStatService *get_pg_stat_service();
friend class C_Updated;
};
MgrClient mgr_client;
uint64_t mgr_proxy_bytes = 0; // in-flight proxied mgr command message bytes
- const PGStatService *pgservice;
+ const MonPGStatService *pgservice;
private:
void new_tick();
return true;
}
-class PGMapStatService : public PGStatService {
+class PGMapStatService : public MonPGStatService {
const PGMap& pgmap;
PGMonitor *pgmon;
public:
}
};
-PGStatService *PGMonitor::get_pg_stat_service()
+MonPGStatService *PGMonitor::get_pg_stat_service()
{
if (!pgservice) {
pgservice.reset(new PGMapStatService(pg_map, this));
#include "mon/MonitorDBStore.h"
class MPGStats;
-class PGStatService;
+class MonPGStatService;
class PGMonitor : public PaxosService {
PGMap pg_map;
- std::unique_ptr<PGStatService> pgservice;
+ std::unique_ptr<MonPGStatService> pgservice;
bool do_delete = false; ///< propose deleting pgmap data
bool did_delete = false; ///< we already deleted pgmap data
void check_subs();
bool check_sub(Subscription *sub);
- PGStatService *get_pg_stat_service();
+ MonPGStatService *get_pg_stat_service();
private:
// no copying allowed
virtual bool is_creating_pg(pg_t pgid) const {
ceph_abort();
}
- /**
- * For upgrades. If the PGMap has newer data than the monitor's new
- * creating_pgs (scan_epoch), insert them into the passed pending_creates.
- */
- virtual unsigned maybe_add_creating_pgs(epoch_t scan_epoch,
- const mempool::osdmap::map<int64_t,pg_pool_t>& pools,
- creating_pgs_t *pending_creates) const {
- ceph_abort();
- return 0;
- }
- /**
- * For upgrades. If some PGs are created before all OSDs are luminous
- * and start sending MOSDPGCreated, we need to be sync with pgmap
- *
- */
- virtual void maybe_trim_creating_pgs(creating_pgs_t *creates) const {
- ceph_abort();
- }
virtual epoch_t get_min_last_epoch_clean() const {
ceph_abort();
}
ceph_abort();
}
+};
+
+class MonPGStatService : public PGStatService {
+public:
+ MonPGStatService() : PGStatService() {}
+ virtual ~MonPGStatService() {}
+ /**
+ * For upgrades. If the PGMap has newer data than the monitor's new
+ * creating_pgs (scan_epoch), insert them into the passed pending_creates.
+ */
+ virtual unsigned maybe_add_creating_pgs(epoch_t scan_epoch,
+ const mempool::osdmap::map<int64_t,pg_pool_t>& pools,
+ creating_pgs_t *pending_creates) const {
+ ceph_abort();
+ return 0;
+ }
+ /**
+ * For upgrades. If some PGs are created before all OSDs are luminous
+ * and start sending MOSDPGCreated, we need to be sync with pgmap
+ *
+ */
+ virtual void maybe_trim_creating_pgs(creating_pgs_t *creates) const {
+ ceph_abort();
+ }
virtual int reweight_by_utilization(const OSDMap &osd_map,
int oload,
double max_changef,