From: Max Kellermann Date: Wed, 13 Nov 2024 20:38:36 +0000 (+0100) Subject: mon/PGMap: un-inline methods to reduce compile times X-Git-Tag: v21.0.0~50^2~17 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cbc7ecefac2f918033e17eb8078f425cc8443f38;p=ceph.git mon/PGMap: un-inline methods to reduce compile times Signed-off-by: Max Kellermann --- diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 76897623e74..f2b158d2ca3 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -53,6 +53,9 @@ MEMPOOL_DEFINE_OBJECT_FACTORY(PGMap::Incremental, pgmap_inc, pgmap); // --------------------- // PGMapDigest +PGMapDigest::PGMapDigest() noexcept = default; +PGMapDigest::~PGMapDigest() noexcept = default; + void PGMapDigest::encode(bufferlist& bl, uint64_t features) const { // NOTE: see PGMap::encode_digest @@ -1009,6 +1012,13 @@ int64_t PGMapDigest::get_pool_free_space(const OSDMap &osd_map, return avail / osd_map.pool_raw_used_rate(poolid); } +PGMap::PGMap() noexcept + : version(0), + last_osdmap_epoch(0), last_pg_scan(0) +{} + +PGMap::~PGMap() noexcept = default; + int64_t PGMap::get_rule_avail(const OSDMap& osdmap, int ruleno) const { map wm; diff --git a/src/mon/PGMap.h b/src/mon/PGMap.h index b60a1769c41..acc94de5cc1 100644 --- a/src/mon/PGMap.h +++ b/src/mon/PGMap.h @@ -45,7 +45,9 @@ class TextTable; class PGMapDigest { public: MEMPOOL_CLASS_HELPERS(); - virtual ~PGMapDigest() {} + + PGMapDigest() noexcept; + virtual ~PGMapDigest() noexcept; mempool::pgmap::vector osd_last_seq; @@ -387,10 +389,8 @@ public: static const int STUCK_STALE = (1<<4); static const int STUCK_PEERING = (1<<5); - PGMap() - : version(0), - last_osdmap_epoch(0), last_pg_scan(0) - {} + PGMap() noexcept; + ~PGMap() noexcept; version_t get_version() const { return version;