From: Sage Weil Date: Fri, 28 Mar 2014 19:34:07 +0000 (-0700) Subject: osdc/ObjectCacher: call read completion even when no target buffer X-Git-Tag: v0.79~67^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=032d4ec53e125ad91ad27ce58da6f38dcf1da92e;p=ceph.git osdc/ObjectCacher: call read completion even when no target buffer If we do no assemble a target bl, we still want to return a valid return code with the number of bytes read-ahead so that the C_RetryRead completion will see this as a finish and call the caller's provided Context. Signed-off-by: Sage Weil --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index eaa7c52e2c2d7..6ecfe82fcb0e0 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -1245,6 +1245,8 @@ int ObjectCacher::_readx(OSDRead *rd, ObjectSet *oset, Context *onfinish, ldout(cct, 10) << "readx result is " << rd->bl->length() << dendl; } else { ldout(cct, 10) << "readx no bufferlist ptr (readahead?), done." << dendl; + map::reverse_iterator i = stripe_map.rbegin(); + pos = i->first + i->second.length(); } // done with read.