]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: do_sparse_read(): On Checksum mismatch try to repair 23378/head
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:16:03 +0000 (20:16 -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 65e9897cf06e67f131da657a4a9a8b46d1317da6..cd3936c10cb5d233ff8c0cbaf13ec5fc2398a055 100644 (file)
@@ -5596,8 +5596,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;
+       }
       }
     }