]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: Check for EC decode errors, though none are possible at this time
authorDavid Zafman <dzafman@redhat.com>
Tue, 4 Aug 2015 20:39:28 +0000 (13:39 -0700)
committerDavid Zafman <dzafman@redhat.com>
Thu, 27 Aug 2015 21:03:22 +0000 (14:03 -0700)
Signed-off-by: David Zafman <dzafman@redhat.com>
src/osd/ECBackend.cc

index 21816346279119ac3a469234f83caf96cb322eab..388a41b5494e6a14c09e81b992897226eb524326 100644 (file)
@@ -367,7 +367,8 @@ void ECBackend::handle_recovery_read_complete(
     from[i->first.shard].claim(i->second);
   }
   dout(10) << __func__ << ": " << from << dendl;
-  ECUtil::decode(sinfo, ec_impl, from, target);
+  int r = ECUtil::decode(sinfo, ec_impl, from, target);
+  assert(r == 0);
   if (attrs) {
     op.xattrs.swap(*attrs);
 
@@ -1682,11 +1683,15 @@ struct CallClientContexts :
           ++j) {
        to_decode[j->first.shard].claim(j->second);
       }
-      ECUtil::decode(
+      int r = ECUtil::decode(
        ec->sinfo,
        ec->ec_impl,
        to_decode,
        &bl);
+      if (r < 0) {
+        res.r = r;
+        goto out;
+      }
       assert(i->second.second);
       assert(i->second.first);
       i->second.first->substr_of(