From: Samuel Just Date: Mon, 19 Jan 2015 20:08:42 +0000 (-0800) Subject: PGBackend: do not update oi digest on inconsistent object X-Git-Tag: v0.93~209^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=738f8687d5345965b8c725f9d7f7429aaf28f7a9;p=ceph.git PGBackend: do not update oi digest on inconsistent object Otherwise, repair can race with the oi update. Also, it doesn't really make sense to update the oi attr if the object is inconsistent. Fixes: #10524 Signed-off-by: Samuel Just --- diff --git a/src/osd/PGBackend.cc b/src/osd/PGBackend.cc index cc5da8fafcda..5ff7edc25dc4 100644 --- a/src/osd/PGBackend.cc +++ b/src/osd/PGBackend.cc @@ -624,15 +624,20 @@ void PGBackend::be_compare_scrubmaps( if (okseed && auth_object.digest_present && auth_object.omap_digest_present && (!auth_oi.is_data_digest() || !auth_oi.is_omap_digest())) { - utime_t age = now - auth_oi.local_mtime; - if (age > g_conf->osd_deep_scrub_update_digest_min_age) { - dout(20) << __func__ << " noting missing digest on " << *k << dendl; - missing_digest[*k] = make_pair(auth_object.digest, - auth_object.omap_digest); + if (!cur_inconsistent.empty() || !cur_missing.empty()) { + dout(20) << __func__ << " not updating oi digest on " + << *k << " since it is inconsistent" << dendl; } else { - dout(20) << __func__ << " missing digest but age " << age - << " < " << g_conf->osd_deep_scrub_update_digest_min_age - << " on " << *k << dendl; + utime_t age = now - auth_oi.local_mtime; + if (age > g_conf->osd_deep_scrub_update_digest_min_age) { + dout(20) << __func__ << " noting missing digest on " << *k << dendl; + missing_digest[*k] = make_pair(auth_object.digest, + auth_object.omap_digest); + } else { + dout(20) << __func__ << " missing digest but age " << age + << " < " << g_conf->osd_deep_scrub_update_digest_min_age + << " on " << *k << dendl; + } } } }