summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-04-18 13:30:45 -0700
committerYehuda Sadeh <yehuda@inktank.com>2013-05-08 11:01:17 -0700
commit4fbf9a75e23428fabb2a4b5f52e015a81685cdda (patch)
treef0c1d43e5b57f6419ea3b96f1c6431c8c3050853
parent0b526d95f3c3c509716c22cfdf01d6a9b5009940 (diff)
downloadceph-4fbf9a75e23428fabb2a4b5f52e015a81685cdda.tar.gz
rgw: fix get_obj() with zero sized obj
Now that even zero sized objs have manifest a test had to be modified. Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
-rw-r--r--src/rgw/rgw_rados.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index 1e84d89361f..679cbb1da31 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -3086,7 +3086,8 @@ int RGWRados::get_obj(void *ctx, RGWObjVersionTracker *objv_tracker, void **hand
else
len = end - ofs + 1;
- if (astate->has_manifest) {
+ if (astate->has_manifest &&
+ astate->manifest.objs.size() > 0) {
/* now get the relevant object part */
map<uint64_t, RGWObjManifestPart>::iterator iter = astate->manifest.objs.upper_bound(ofs);
/* we're now pointing at the next part (unless the first part starts at a higher ofs),