]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: do_sparse_read(): On Checksum mismatch try to repair
authorDavid Zafman <dzafman@redhat.com>
Wed, 1 Aug 2018 23:12:16 +0000 (16:12 -0700)
committerDavid Zafman <dzafman@redhat.com>
Thu, 2 Aug 2018 03:10:11 +0000 (20:10 -0700)
Fixes: http://tracker.ceph.com/issues/24875
Signed-off-by: David Zafman <dzafman@redhat.com>
src/osd/PrimaryLogPG.cc

index fc63d2a60b2db4ac3cc5a9d25d568808bf5ab4b0..4d3e131c0a30bbf415dc8847a2100ae241bc044e 100644 (file)
@@ -5584,8 +5584,10 @@ int PrimaryLogPG::do_sparse_read(OpContext *ctx, OSDOp& osd_op) {
           << " full-object read crc 0x" << crc
           << " != expected 0x" << oi.data_digest
           << std::dec << " on " << soid;
-        // FIXME fall back to replica or something?
-        return -EIO;
+        r = rep_repair_primary_object(soid, ctx->op);
+       if (r < 0) {
+         return r;
+       }
       }
     }