diff options
author | David Zafman <david.zafman@inktank.com> | 2013-05-13 23:26:54 -0700 |
---|---|---|
committer | David Zafman <david.zafman@inktank.com> | 2013-05-14 16:28:40 -0700 |
commit | 1f4e7a5aafdace9fb82d311ec4ff0a1a6c7c9a31 (patch) | |
tree | dc77d73fba401dd6b37094971d5b060645afe9d1 /src/osd/OSD.cc | |
parent | 88af2b0f7b951367e670869db76e57f0d970aa38 (diff) | |
download | ceph-1f4e7a5aafdace9fb82d311ec4ff0a1a6c7c9a31.tar.gz |
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 <david.zafman@inktank.com>
Diffstat (limited to 'src/osd/OSD.cc')
-rw-r--r-- | src/osd/OSD.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 65687429894..b8ef3bb2098 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. |