]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMapping: Remove get_num_acting_pgs 50327/head
authorMatan Breizman <mbreizma@redhat.com>
Tue, 20 Dec 2022 15:36:51 +0000 (15:36 +0000)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 9 Mar 2023 13:20:20 +0000 (13:20 +0000)
Introduced here: bd9813f5e1a3addca1a57360d58b50b120e0e5f3
As check_pg_num() is changed, this method is no longer needed.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
(cherry picked from commit 0816eb98dba42af57681d361f5244594ef2f53dc)

src/osd/OSDMapMapping.h

index eeeb7a8bc7f3a9cb7d392edfa34f495c08995822..8f779c41e6698a39a390feab47ff4e941ec32e43 100644 (file)
@@ -247,16 +247,6 @@ private:
        row[4 + size + i] = up[i];
       }
     }
-
-    uint64_t get_num_acting_pgs() const {
-      uint64_t num_acting_pgs = 0;
-      const size_t row_size = this->row_size();
-      for (size_t ps = 0; ps < pg_num; ++ps) {
-        const int32_t *row = &table[row_size * ps];
-        num_acting_pgs += row[2];
-      }
-      return num_acting_pgs;
-    }
   };
 
   mempool::osdmap_mapping::map<int64_t,PoolMapping> pools;
@@ -340,12 +330,6 @@ public:
     return acting_rmap[osd];
   }
 
-  uint64_t get_num_acting_pgs(int64_t pool) const {
-    auto p = pools.find(pool);
-    ceph_assert(p != pools.end());
-    return p->second.get_num_acting_pgs();
-  }
-
   void update(const OSDMap& map, pg_t pgid);
 
   std::unique_ptr<MappingJob> start_update(