]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMonitor: mark dump_object_stat_sum() as static
authorKefu Chai <kchai@redhat.com>
Sat, 6 Aug 2016 16:58:04 +0000 (00:58 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 6 Aug 2016 16:59:25 +0000 (00:59 +0800)
so we can test this method without create an instance of PGMonitor.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/PGMonitor.cc
src/mon/PGMonitor.h

index b6ad175bf4f7c1efaf36cf14016352b63e0138ff..f9b0aeaa4c3458c9b527d55d5b621e71029f0519 100644 (file)
@@ -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)
index c2b917b63aa60360c721c8c3179053ec910bd9e0..098fcbcbeb1ffa5cfa8a88bf1cf22a93e8c02456 100644 (file)
@@ -147,11 +147,11 @@ private:
                          int threshold,
                          vector<string>& 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;