From 08f81a9b2b8aed4792e5b16b57a2fffa6fe92895 Mon Sep 17 00:00:00 2001 From: David Zafman Date: Tue, 4 Aug 2015 13:39:28 -0700 Subject: [PATCH] osd: Check for EC decode errors, though none are possible at this time Signed-off-by: David Zafman --- src/osd/ECBackend.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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( -- 2.47.3