]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMap: remove get_full_osd_util
authorSage Weil <sage@redhat.com>
Mon, 28 Aug 2017 20:37:04 +0000 (16:37 -0400)
committerSage Weil <sage@redhat.com>
Wed, 6 Sep 2017 14:18:04 +0000 (10:18 -0400)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSDMap.cc
src/osd/OSDMap.h

index 7ed0d2f7464a37508cb9ba741fa228b29c00f3e7..0341927125fdb3a031d15376e37565385bb0a1ca 100644 (file)
@@ -1175,30 +1175,6 @@ static bool get_osd_utilization(
   return *kb > 0;
 }
 
-void OSDMap::get_full_osd_util(
-  const mempool::pgmap::unordered_map<int32_t,osd_stat_t> &osd_stat,
-  map<int, float> *full, map<int, float> *backfill, map<int, float> *nearfull) const
-{
-  full->clear();
-  backfill->clear();
-  nearfull->clear();
-  for (int i = 0; i < max_osd; ++i) {
-    if (exists(i) && is_up(i) && is_in(i)) {
-      int64_t kb, kb_used, kb_avail;
-      if (osd_state[i] & CEPH_OSD_FULL) {
-        if (get_osd_utilization(osd_stat, i, &kb, &kb_used, &kb_avail))
-         full->emplace(i, (float)kb_used / (float)kb);
-      } else if (osd_state[i] & CEPH_OSD_BACKFILLFULL) {
-        if (get_osd_utilization(osd_stat, i, &kb, &kb_used, &kb_avail))
-         backfill->emplace(i, (float)kb_used / (float)kb);
-      } else if (osd_state[i] & CEPH_OSD_NEARFULL) {
-        if (get_osd_utilization(osd_stat, i, &kb, &kb_used, &kb_avail))
-         nearfull->emplace(i, (float)kb_used / (float)kb);
-      }
-    }
-  }
-}
-
 void OSDMap::get_full_osd_counts(set<int> *full, set<int> *backfill,
                                 set<int> *nearfull) const
 {
index 2cd26f2a33b611c00857965faac2bd0ab4b557bc..a347d7f04e11bfa247ce21e0af03d3fe25e6a15a 100644 (file)
@@ -645,12 +645,6 @@ public:
     return nearfull_ratio;
   }
   void count_full_nearfull_osds(int *full, int *backfill, int *nearfull) const;
-  void get_full_osd_util(
-    const mempool::pgmap::unordered_map<int32_t,osd_stat_t> &osd_stat,
-    map<int, float> *full,
-    map<int, float> *backfill,
-    map<int, float> *nearfull) const;
-
   void get_full_osd_counts(set<int> *full, set<int> *backfill,
                           set<int> *nearfull) const;