]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSD: Don't scrub newly created PGs until min interval
authorDavid Zafman <david.zafman@inktank.com>
Tue, 14 May 2013 06:26:54 +0000 (23:26 -0700)
committerDavid Zafman <david.zafman@inktank.com>
Tue, 14 May 2013 23:28:40 +0000 (16:28 -0700)
Set initial values for last_scrub_stamp, last_deep_scrub_stamp

fixes: #5050, #5051

Signed-off-by: David Zafman <david.zafman@inktank.com>
src/osd/OSD.cc

index 6568742989447ad4d00e9f11ca794d0d0f220fa8..b8ef3bb2098c7ef3113042295ba54e148a4ccebf 100644 (file)
@@ -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.