From: Sage Weil Date: Mon, 14 Dec 2015 17:59:29 +0000 (-0500) Subject: osd/PGBackend: use mtime for digest decision if local_mtime is empty X-Git-Tag: v0.94.6~50^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=98bdb09bb8d632b2df0b252b3d9676fd9511a1c8;p=ceph.git osd/PGBackend: use mtime for digest decision if local_mtime is empty If we don't have a local_mtime value, use mtime instead, for the purposes of deciding if we should record a digest after scrub. Signed-off-by: Sage Weil --- diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index 7fc56d10fa49..2b897d7f8e0b 100644 --- a/src/osd/PGBackend.cc +++ b/src/osd/PGBackend.cc @@ -675,7 +675,10 @@ void PGBackend::be_compare_scrubmaps( update = MAYBE; } if (update != NO) { - utime_t age = now - auth_oi.local_mtime; + utime_t mtime = auth_oi.local_mtime; + if (mtime == utime_t()) + mtime = auth_oi.mtime; + utime_t age = now - mtime; if (update == FORCE || age > g_conf->osd_deep_scrub_update_digest_min_age) { dout(20) << __func__ << " will update digest on " << *k << dendl;