]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mon/pgmap: make pool id type consistent for statistics operations
authorIgor Fedotov <ifedotov@suse.com>
Fri, 15 Dec 2017 22:42:51 +0000 (01:42 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Thu, 6 Dec 2018 15:54:21 +0000 (18:54 +0300)
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/mon/PGMap.cc
src/mon/PGMap.h

index bd15dc13076eb3c88b17be3d45c28afdbf3ad103..a4c1b1731dde8cd3a78b21fb04877339ff7f8b22 100644 (file)
@@ -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);
   }
 }
 
index aaaef6b91e78d0a52310e229a0ff63d0d5d96802..1b827aa0b166ecbe9115a4be1303db1a44b2f53b 100644 (file)
@@ -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<uint64_t, mempool::pgmap::list< pair<pool_stat_t, utime_t> > > per_pool_sum_deltas;
+  mempool::pgmap::unordered_map<int64_t, mempool::pgmap::list< pair<pool_stat_t, utime_t> > > per_pool_sum_deltas;
   /**
    * keep track of per-pool timestamp deltas, according to last update on
    * each pool.
    */
-  mempool::pgmap::unordered_map<uint64_t, utime_t> per_pool_sum_deltas_stamps;
+  mempool::pgmap::unordered_map<int64_t, utime_t> 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<uint64_t, pair<pool_stat_t,utime_t> > per_pool_sum_delta;
+  mempool::pgmap::unordered_map<int64_t, pair<pool_stat_t,utime_t> > 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: