Currently the PGMap may register the new pg in multiple places: the
mgr or mon, and the timestamp is when the mon or mgr gets around to
recording it into its PGMap. Make this deterministic by using the OSDMap
mtime (which is when the PG was *actually* created).
This fixes a problem where the pg create command has one timestamp (from
the mon) and the pgmap on the mgr has another, so an observer will see the
last_scrub_stamp (and other timestamps) change when nothing has actually
happened.
Signed-off-by: Sage Weil <sage@redhat.com>
stats.last_deep_scrub_stamp = ps.last_deep_scrub_stamp;
stats.last_clean_scrub_stamp = ps.last_clean_scrub_stamp;
} else {
- utime_t now = ceph_clock_now();
+ utime_t now = osd_map.get_modified();
stats.last_fresh = now;
stats.last_active = now;
stats.last_change = now;