`pg_sum` is accumulated during `PGMap::apply_incremental`,
so if we want to make an old copy of it, we should do it at
the beginning. Or else, the `pg_sum_deltas` is always zero.
Signed-off-by: Yao Zongyou <yaozongyou@vip.qq.com>
ceph_assert(inc.version == version+1);
version++;
+ pool_stat_t pg_sum_old = pg_sum;
mempool::pgmap::unordered_map<int32_t, pool_stat_t> pg_pool_sum_old;
pg_pool_sum_old = pg_pool_sum;
}
}
- pool_stat_t pg_sum_old = pg_sum;
// skip calculating delta while sum was not synchronized
if (!stamp.is_zero() && !pg_sum_old.stats.sum.is_zero()) {
utime_t delta_t;