]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: only look at prefetched data if we actually prefetched
authorYehuda Sadeh <yehuda@inktank.com>
Fri, 28 Mar 2014 20:25:47 +0000 (13:25 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Fri, 28 Mar 2014 20:25:47 +0000 (13:25 -0700)
Fixes: #7903
Since we didn't prefetch data then we couldn't rely on the data to
actually exist there. In that case just move on and read the object.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_rados.cc

index 41ff4f4dd47e62883cfe7bba593308c2a7c8ed57..55f83cf59825aa00585a8f5f82d7db01955943bf 100644 (file)
@@ -4559,7 +4559,7 @@ int RGWRados::get_obj(void *ctx, RGWObjVersionTracker *objv_tracker, void **hand
     if (r < 0)
       goto done_ret;
 
-    if (astate) {
+    if (astate && astate->prefetch_data) {
       if (!ofs && astate->data.length() >= len) {
         bl = astate->data;
         goto done;