]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: rewrite digest only when the digest exists on auth obj 7051/head
authorZhiqiang Wang <wonzhq@hotmail.com>
Mon, 15 Feb 2016 09:05:07 +0000 (17:05 +0800)
committerZhiqiang Wang <wonzhq@hotmail.com>
Mon, 15 Feb 2016 09:05:07 +0000 (17:05 +0800)
Signed-off-by: Zhiqiang Wang <wonzhq@hotmail.com>
src/osd/PGBackend.cc

index b2d6fad0890c17598280fabb37b2504fcb38963d..8c007a2ba728795a0fcfe15237abed37adde15a6 100644 (file)
@@ -640,7 +640,8 @@ void PGBackend::be_compare_scrubmaps(
        dout(20) << __func__ << " missing digest on " << *k << dendl;
        update = MAYBE;
       }
-      if (g_conf->osd_debug_scrub_chance_rewrite_digest &&
+      if (auth_object.digest_present && auth_object.omap_digest_present &&
+         g_conf->osd_debug_scrub_chance_rewrite_digest &&
          (((unsigned)rand() % 100) >
           g_conf->osd_debug_scrub_chance_rewrite_digest)) {
        dout(20) << __func__ << " randomly updating digest on " << *k << dendl;