]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Handle omap and data digests independently 22375/head
authorDavid Zafman <dzafman@redhat.com>
Thu, 31 May 2018 00:18:03 +0000 (17:18 -0700)
committerDavid Zafman <dzafman@redhat.com>
Thu, 31 May 2018 17:58:43 +0000 (10:58 -0700)
Caused by: be078c8b7b131764caa28bc44452b8c5c2339623
The original attempt above to fix the omap_digest handling when
data_digest isn't present had 2 errors.  First, it checked
is_data_digest() and is_omap_digest() instead of digest_present and
omap_digest_present which indicate the source digest is available.
Second, MAYBE could only be set if both digests are available.

Fixes: http://tracker.ceph.com/issues/24366
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 01f9669928abd571e14421a51a749d44fa041337)

src/osd/PGBackend.cc

index ecc404c6f7842d7b6570ceb3c0bdf9e3d2a7ca74..7c508adf396d5ddb102f6fa2b9111404f3efddc4 100644 (file)
@@ -1059,9 +1059,12 @@ void PGBackend::be_compare_scrubmaps(
        FORCE = 2,
       } update = NO;
 
-      if (auth_object.digest_present && auth_object.omap_digest_present &&
-         (!auth_oi.is_data_digest() || !auth_oi.is_omap_digest())) {
-       dout(20) << __func__ << " missing digest on " << *k << dendl;
+      if (auth_object.digest_present && !auth_oi.is_data_digest()) {
+       dout(20) << __func__ << " missing data digest on " << *k << dendl;
+       update = MAYBE;
+      }
+      if (auth_object.omap_digest_present && !auth_oi.is_omap_digest()) {
+       dout(20) << __func__ << " missing omap digest on " << *k << dendl;
        update = MAYBE;
       }
 
@@ -1091,13 +1094,14 @@ void PGBackend::be_compare_scrubmaps(
        utime_t age = now - auth_oi.local_mtime;
        if (update == FORCE ||
            age > cct->_conf->osd_deep_scrub_update_digest_min_age) {
-         dout(20) << __func__ << " will update digest on " << *k << dendl;
           boost::optional<uint32_t> data_digest, omap_digest;
-          if (auth_oi.is_data_digest()) {
+          if (auth_object.digest_present) {
             data_digest = auth_object.digest;
+           dout(20) << __func__ << " will update data digest on " << *k << dendl;
           }
-          if (auth_oi.is_omap_digest()) {
+          if (auth_object.omap_digest_present) {
             omap_digest = auth_object.omap_digest;
+           dout(20) << __func__ << " will update omap digest on " << *k << dendl;
           }
          missing_digest[*k] = make_pair(data_digest, omap_digest);
        } else {