From: David Zafman Date: Tue, 4 Aug 2015 20:39:28 +0000 (-0700) Subject: osd: Check for EC decode errors, though none are possible at this time X-Git-Tag: v9.1.0~244^2~9 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=08f81a9b2b8aed4792e5b16b57a2fffa6fe92895;p=ceph.git osd: Check for EC decode errors, though none are possible at this time Signed-off-by: David Zafman --- diff --git a/src/osd/ECBackend.cc b/src/osd/ECBackend.cc index 218163462791..388a41b5494e 100644 --- a/src/osd/ECBackend.cc +++ b/src/osd/ECBackend.cc @@ -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(