]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/ObjectCacher: call read completion even when no target buffer
authorSage Weil <sage@inktank.com>
Fri, 28 Mar 2014 19:34:07 +0000 (12:34 -0700)
committerSage Weil <sage@inktank.com>
Fri, 28 Mar 2014 21:55:09 +0000 (14:55 -0700)
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 <sage@inktank.com>
src/osdc/ObjectCacher.cc

index eaa7c52e2c2d786838737b9b2e80e2a8be960f25..6ecfe82fcb0e06576b5e1966c59094e967487961 100644 (file)
@@ -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<uint64_t,bufferlist>::reverse_iterator i = stripe_map.rbegin();
+    pos = i->first + i->second.length();
   }
 
   // done with read.