From 063ad5aa2d08e4357c9a3d6560c9cbc547e2c717 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 18 May 2017 19:50:36 +0800 Subject: [PATCH] mon: more constness to PGStatService Signed-off-by: Kefu Chai --- src/mon/Monitor.h | 2 +- src/mon/PGMonitor.cc | 4 ++-- src/mon/PGStatService.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mon/Monitor.h b/src/mon/Monitor.h index e1cdb3ef525..47beafb4bd0 100644 --- a/src/mon/Monitor.h +++ b/src/mon/Monitor.h @@ -170,7 +170,7 @@ public: MgrClient mgr_client; uint64_t mgr_proxy_bytes = 0; // in-flight proxied mgr command message bytes - PGStatService *pgservice; + const PGStatService *pgservice; private: void new_tick(); diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index a9ad27e73f2..48a7c0834f6 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -1295,7 +1295,7 @@ public: const OSDMap& osdmap, Formatter *f, stringstream *ss, - bufferlist *odata) override { + bufferlist *odata) const override { return process_pg_map_command(prefix, cmdmap, pgmap, osdmap, f, ss, odata); } @@ -1308,7 +1308,7 @@ public: mempool::osdmap::map* new_weights, std::stringstream *ss, std::string *out_str, - Formatter *f) override { + Formatter *f) const override { return reweight::by_utilization(osd_map, pgmap, oload, max_changef, max_osds, by_pg, pools, no_increasing, new_weights, ss, out_str, f); diff --git a/src/mon/PGStatService.h b/src/mon/PGStatService.h index 9f7900795b1..4064b109ea9 100644 --- a/src/mon/PGStatService.h +++ b/src/mon/PGStatService.h @@ -93,7 +93,7 @@ public: const OSDMap& osdmap, Formatter *f, stringstream *ss, - bufferlist *odata) { + bufferlist *odata) const { ceph_abort(); } @@ -106,7 +106,7 @@ public: mempool::osdmap::map* new_weights, std::stringstream *ss, std::string *out_str, - Formatter *f) { + Formatter *f) const { ceph_abort(); } }; -- 2.39.5