]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do_sparse_read(): On Checksum mismatch try to repair 23379/head
authorDavid Zafman <dzafman@redhat.com>
Wed, 1 Aug 2018 23:12:16 +0000 (16:12 -0700)
committerDavid Zafman <dzafman@redhat.com>
Mon, 30 Jul 2018 10:32:46 +0000 (03:32 -0700)
Fixes: http://tracker.ceph.com/issues/24875
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 929f78ab895e63667c36e57cc44d14a1402f4f9d)

src/osd/PrimaryLogPG.cc

index 99688aee4dd6db85ce5c9accb0affcbf2dd2cd1c..99ee0fa6b8cdd4f39882bae8d8ea1c6d5aeb9fae 100644 (file)
@@ -5034,8 +5034,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;
+       }
       }
     }