From: David Zafman Date: Tue, 14 May 2013 06:26:54 +0000 (-0700) Subject: OSD: Don't scrub newly created PGs until min interval X-Git-Tag: v0.64~127^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1f4e7a5aafdace9fb82d311ec4ff0a1a6c7c9a31;p=ceph.git OSD: Don't scrub newly created PGs until min interval Set initial values for last_scrub_stamp, last_deep_scrub_stamp fixes: #5050, #5051 Signed-off-by: David Zafman --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 656874298944..b8ef3bb2098c 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -5291,6 +5291,11 @@ void OSD::handle_pg_create(OpRequestRef op) pg_history_t history; history.epoch_created = created; history.last_epoch_clean = created; + // Newly created PGs don't need to scrub immediately, so mark them + // as scrubbed at creation time. + utime_t now = ceph_clock_now(NULL); + history.last_scrub_stamp = now; + history.last_deep_scrub_stamp = now; project_pg_history(pgid, history, created, up, acting); // register.