From 650aef19584eb147dd3d81610aca723988240e3a Mon Sep 17 00:00:00 2001 From: Igor Fedotov Date: Sat, 16 Dec 2017 01:42:51 +0300 Subject: [PATCH] mon/pgmap: make pool id type consistent for statistics operations Signed-off-by: Igor Fedotov --- src/mon/PGMap.cc | 4 ++-- src/mon/PGMap.h | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index bd15dc13076..a4c1b1731dd 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -2080,7 +2080,7 @@ void PGMap::update_delta( void PGMap::update_one_pool_delta( CephContext *cct, const utime_t ts, - const uint64_t pool, + const int64_t pool, const pool_stat_t& old_pool_sum) { if (per_pool_sum_deltas.count(pool) == 0) { @@ -2108,7 +2108,7 @@ void PGMap::update_pool_deltas( { for (auto it = pg_pool_sum_old.begin(); it != pg_pool_sum_old.end(); ++it) { - update_one_pool_delta(cct, ts, (uint64_t)it->first, it->second); //FIXME: make pool type consistent!!! + update_one_pool_delta(cct, ts, it->first, it->second); } } diff --git a/src/mon/PGMap.h b/src/mon/PGMap.h index aaaef6b91e7..1b827aa0b16 100644 --- a/src/mon/PGMap.h +++ b/src/mon/PGMap.h @@ -75,19 +75,19 @@ public: * keep track of last deltas for each pool, calculated using * @p pg_pool_sum as baseline. */ - mempool::pgmap::unordered_map > > per_pool_sum_deltas; + mempool::pgmap::unordered_map > > per_pool_sum_deltas; /** * keep track of per-pool timestamp deltas, according to last update on * each pool. */ - mempool::pgmap::unordered_map per_pool_sum_deltas_stamps; + mempool::pgmap::unordered_map per_pool_sum_deltas_stamps; /** * keep track of sum deltas, per-pool, taking into account any previous * deltas existing in @p per_pool_sum_deltas. The utime_t as second member * of the pair is the timestamp referring to the last update (i.e., the first * member of the pair) for a given pool. */ - mempool::pgmap::unordered_map > per_pool_sum_delta; + mempool::pgmap::unordered_map > per_pool_sum_delta; pool_stat_t pg_sum_delta; utime_t stamp_delta; @@ -334,7 +334,7 @@ public: void update_one_pool_delta(CephContext *cct, const utime_t ts, - const uint64_t pool, + const int64_t pool, const pool_stat_t& old_pool_sum); public: -- 2.39.5