From dfd3cb51404050c916f5131b0179cede8ceb7b10 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Fri, 28 Mar 2014 13:25:47 -0700 Subject: [PATCH] rgw: only look at prefetched data if we actually prefetched 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 --- src/rgw/rgw_rados.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 41ff4f4dd47e6..55f83cf59825a 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -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; -- 2.39.5