From 31c900d7058ad34604e510cb5f212686a715136d Mon Sep 17 00:00:00 2001 From: Matan Breizman Date: Tue, 20 Dec 2022 15:36:51 +0000 Subject: [PATCH] osd/OSDMapping: Remove get_num_acting_pgs Introduced here: bd9813f5e1a3addca1a57360d58b50b120e0e5f3 As check_pg_num() is changed, this method is no longer needed. Signed-off-by: Matan Breizman (cherry picked from commit 0816eb98dba42af57681d361f5244594ef2f53dc) --- src/osd/OSDMapMapping.h | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/osd/OSDMapMapping.h b/src/osd/OSDMapMapping.h index eeeb7a8bc7f3a..8f779c41e6698 100644 --- a/src/osd/OSDMapMapping.h +++ b/src/osd/OSDMapMapping.h @@ -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 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 start_update( -- 2.39.5