From: David Zafman Date: Wed, 1 Aug 2018 23:12:16 +0000 (-0700) Subject: osd: do_sparse_read(): On Checksum mismatch try to repair X-Git-Tag: v13.2.2~101^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F23378%2Fhead;p=ceph.git osd: do_sparse_read(): On Checksum mismatch try to repair Fixes: http://tracker.ceph.com/issues/24875 Signed-off-by: David Zafman (cherry picked from commit 929f78ab895e63667c36e57cc44d14a1402f4f9d) --- diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 65e9897cf06e..cd3936c10cb5 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -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; + } } }