Signed-off-by: Li Wang <li.wang@kylin-cloud.com>
Reported-by: Jie Wang <jie.wang@kylin-cloud.com>
utime_t now = ceph_clock_now(cct);
if (info.stats.state != state) {
- info.stats.state = state;
info.stats.last_change = now;
if ((state & PG_STATE_ACTIVE) &&
!(info.stats.state & PG_STATE_ACTIVE))
if ((state & (PG_STATE_ACTIVE|PG_STATE_PEERED)) &&
!(info.stats.state & (PG_STATE_ACTIVE|PG_STATE_PEERED)))
info.stats.last_became_peered = now;
+ info.stats.state = state;
}
_update_calc_stats();