From: Jianpeng Ma Date: Mon, 26 Jan 2015 07:53:57 +0000 (+0800) Subject: ObjectCacher: Only r >= 0, it need the read data. X-Git-Tag: v0.93~139^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F3531%2Fhead;p=ceph.git ObjectCacher: Only r >= 0, it need the read data. Signed-off-by: Jianpeng Ma --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index f54c356c128..3ee61991c84 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -663,7 +663,7 @@ void ObjectCacher::bh_read_finish(int64_t poolid, sobject_t oid, ceph_tid_t tid, << " outstanding reads " << reads_outstanding << dendl; - if (bl.length() < length) { + if (r >= 0 && bl.length() < length) { bufferptr bp(length - bl.length()); bp.zero(); ldout(cct, 7) << "bh_read_finish " << oid << " padding " << start << "~" << length