From: Kefu Chai Date: Sat, 6 Aug 2016 16:58:04 +0000 (+0800) Subject: mon/PGMonitor: mark dump_object_stat_sum() as static X-Git-Tag: v11.0.1~412^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=af3d3e25823ca9b40ddf09835edb82795ac68f33;p=ceph.git mon/PGMonitor: mark dump_object_stat_sum() as static so we can test this method without create an instance of PGMonitor. Signed-off-by: Kefu Chai --- diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index b6ad175bf4f..f9b0aeaa4c3 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -1350,7 +1350,7 @@ inline string percentify(const float& a) { //void PGMonitor::dump_object_stat_sum(stringstream& ss, Formatter *f, void PGMonitor::dump_object_stat_sum(TextTable &tbl, Formatter *f, object_stat_sum_t &sum, uint64_t avail, - float raw_used_rate, bool verbose, const pg_pool_t *pool) const + float raw_used_rate, bool verbose, const pg_pool_t *pool) { float curr_object_copies_rate = 0.0; if (sum.num_object_copies > 0) diff --git a/src/mon/PGMonitor.h b/src/mon/PGMonitor.h index c2b917b63aa..098fcbcbeb1 100644 --- a/src/mon/PGMonitor.h +++ b/src/mon/PGMonitor.h @@ -147,11 +147,11 @@ private: int threshold, vector& args) const; - void dump_object_stat_sum(TextTable &tbl, Formatter *f, - object_stat_sum_t &sum, - uint64_t avail, - float raw_used_rate, - bool verbose, const pg_pool_t *pool) const; + static void dump_object_stat_sum(TextTable &tbl, Formatter *f, + object_stat_sum_t &sum, + uint64_t avail, + float raw_used_rate, + bool verbose, const pg_pool_t *pool); int64_t get_rule_avail(OSDMap& osdmap, int ruleno) const;