const ceph::unordered_map<int32_t,osd_stat_t> *get_osd_stat() const {
return &parent.osd_stat;
}
- const ceph::unordered_map<pg_t,pg_stat_t> *get_pg_stat() const {
- return &parent.pg_stat;
- }
- float get_full_ratio() const { return parent.full_ratio; }
- float get_nearfull_ratio() const { return parent.nearfull_ratio; }
-
- bool have_creating_pgs() const { return !parent.creating_pgs.empty(); }
- bool is_creating_pg(pg_t pgid) const { return parent.creating_pgs.count(pgid); }
- virtual void maybe_add_creating_pgs(epoch_t scan_epoch,
- creating_pgs_t *pending_creates) const {
- if (parent.last_pg_scan >= scan_epoch) {
- for (auto& pgid : parent.creating_pgs) {
- auto st = parent.pg_stat.find(pgid);
- assert(st != parent.pg_stat.end());
- auto created = make_pair(st->second.created, st->second.last_scrub_stamp);
- // no need to add the pg, if it already exists in creating_pgs
- pending_creates->pgs.emplace(pgid, created);
- }
- }
- }
- epoch_t get_min_last_epoch_clean() const { return parent.get_min_last_epoch_clean(); }
- bool have_full_osds() const { return !parent.full_osds.empty(); }
- bool have_nearfull_osds() const { return !parent.nearfull_osds.empty(); }
-
- size_t get_num_pg_by_osd(int osd) const { return parent.get_num_pg_by_osd(osd); }
+ size_t get_num_pg_by_osd(int osd) const {
+ return parent.get_num_pg_by_osd(osd);
+ }
- void print_summary(Formatter *f, ostream *out) const { parent.print_summary(f, out); }
+ void print_summary(Formatter *f, ostream *out) const {
+ parent.print_summary(f, out);
+ }
void dump_fs_stats(stringstream *ss, Formatter *f, bool verbose) const {
parent.dump_fs_stats(ss, f, verbose);
}
bool verbose) const {
parent.dump_pool_stats_full(osdm, ss, f, verbose);
}
-
- int process_pg_command(const string& prefix,
- const map<string,cmd_vartype>& cmdmap,
- const OSDMap& osdmap,
- Formatter *f,
- stringstream *ss,
- bufferlist *odata) {
- return process_pg_map_command(prefix, cmdmap, parent, osdmap, f, ss, odata);
- }
-
- int reweight_by_utilization(const OSDMap &osd_map,
- int oload,
- double max_changef,
- int max_osds,
- bool by_pg, const set<int64_t> *pools,
- bool no_increasing,
- mempool::osdmap::map<int32_t, uint32_t>* new_weights,
- std::stringstream *ss,
- std::string *out_str,
- Formatter *f) {
- return reweight::by_utilization(osd_map, parent, oload, max_changef,
- max_osds, by_pg, pools, no_increasing,
- new_weights, ss, out_str, f);
- }
-
};
virtual const osd_stat_t *get_osd_stat(int osd) const = 0;
virtual const ceph::unordered_map<int32_t,osd_stat_t> *get_osd_stat() const = 0;
- virtual const ceph::unordered_map<pg_t,pg_stat_t> *get_pg_stat() const = 0;
- virtual float get_full_ratio() const = 0;
- virtual float get_nearfull_ratio() const = 0;
- virtual bool have_creating_pgs() const = 0;
- virtual bool is_creating_pg(pg_t pgid) const = 0;
+ virtual const ceph::unordered_map<pg_t,pg_stat_t> *get_pg_stat() const {
+ ceph_abort();
+ }
+ virtual float get_full_ratio() const {
+ ceph_abort();
+ }
+ virtual float get_nearfull_ratio() const {
+ ceph_abort();
+ }
+ virtual bool have_creating_pgs() const {
+ ceph_abort();
+ }
+ 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 void maybe_add_creating_pgs(epoch_t scan_epoch,
- creating_pgs_t *pending_creates) const = 0;
- virtual epoch_t get_min_last_epoch_clean() const = 0;
+ creating_pgs_t *pending_creates) const {
+ ceph_abort();
+ }
+ virtual epoch_t get_min_last_epoch_clean() const {
+ ceph_abort();
+ }
- virtual bool have_full_osds() const = 0;
- virtual bool have_nearfull_osds() const = 0;
+ virtual bool have_full_osds() const {
+ ceph_abort();
+ }
+ virtual bool have_nearfull_osds() const {
+ ceph_abort();
+ }
virtual size_t get_num_pg_by_osd(int osd) const = 0;
virtual void print_summary(Formatter *f, ostream *out) const = 0;
const OSDMap& osdmap,
Formatter *f,
stringstream *ss,
- bufferlist *odata) = 0;
+ bufferlist *odata) {
+ ceph_abort();
+ }
virtual int reweight_by_utilization(const OSDMap &osd_map,
int oload,
mempool::osdmap::map<int32_t, uint32_t>* new_weights,
std::stringstream *ss,
std::string *out_str,
- Formatter *f) = 0;
+ Formatter *f) {
+ ceph_abort();
+ }
};
#endif