mon: PGMonitor: populate scrub timestamps with 'now' on pg creation

Fixes: #9496

Signed-off-by: Joao Eduardo Luis <joao@redhat.com>
This commit is contained in:
Joao Eduardo Luis 2014-10-08 00:13:49 +01:00
parent ccdbfb441a
commit 0dd3afd87e

View File

@ -983,6 +983,11 @@ void PGMonitor::register_pg(pg_pool_t& pool, pg_t pgid, epoch_t epoch, bool new_
stats.parent = parent;
stats.parent_split_bits = split_bits;
utime_t now = ceph_clock_now(g_ceph_context);
stats.last_scrub_stamp = now;
stats.last_deep_scrub_stamp = now;
stats.last_clean_scrub_stamp = now;
if (split_bits == 0) {
dout(10) << "register_new_pgs will create " << pgid << dendl;
} else {