From dbfb993cf9f02cad1f5015e0ce068032368fba75 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 28 Mar 2014 12:34:07 -0700 Subject: [PATCH] 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 (cherry picked from commit 032d4ec53e125ad91ad27ce58da6f38dcf1da92e) --- src/osdc/ObjectCacher.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 29cfea585ef0e..9450a27de3620 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. -- 2.39.5