From: David Zafman Date: Fri, 28 Jul 2017 18:48:28 +0000 (-0700) Subject: osd: EC read handling: don't grab an objectstore error to use as the read error X-Git-Tag: v12.1.2~21^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e03e731abce0396ba854068cddc838b74e6a18a4;p=ceph.git osd: EC read handling: don't grab an objectstore error to use as the read error Signed-off-by: David Zafman --- diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index fccb834ef54fd..40be6a31d4d92 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -1217,13 +1217,11 @@ void ECBackend::handle_sub_read_reply( } // Couldn't read any additional shards so handle as completed with errors } - if (rop.complete[iter->first].errors.empty()) { - dout(20) << __func__ << " simply not enough copies err=" << err << dendl; - } else { - // Grab the first error - err = rop.complete[iter->first].errors.begin()->second; - dout(20) << __func__ << ": Use one of the shard errors err=" << err << dendl; - } + // We don't want to confuse clients / RBD with objectstore error + // values in particular ENOENT. We may have different error returns + // from different shards, so we'll return minimum_to_decode() error + // (usually EIO) to reader. It is likely an error here is due to a + // damaged pg. rop.complete[iter->first].r = err; ++is_complete; }