]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: EC read handling: don't grab an objectstore error to use as the read error 16663/head
authorDavid Zafman <dzafman@redhat.com>
Fri, 28 Jul 2017 18:48:28 +0000 (11:48 -0700)
committerDavid Zafman <dzafman@redhat.com>
Fri, 28 Jul 2017 22:23:53 +0000 (15:23 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
src/osd/ECBackend.cc

index fccb834ef54fd9591eb069a3d2f5185e7dd4bb50..40be6a31d4d929f62a30dc5f652a5cfecb33115e 100644 (file)
@@ -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;
        }