summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2013-04-18 13:30:45 -0700
committerYehuda Sadeh <yehuda@inktank.com>2013-04-18 13:30:45 -0700
commit2265fe3aa7499359c38673cf159faab0c382a3cd (patch)
tree76a138e5b9e80c405ad704640ec3464e37d779ba
parentd4bd9247034c693c34ab142bb3afa97178523976 (diff)
downloadceph-2265fe3aa7499359c38673cf159faab0c382a3cd.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 ad9bc56e375..e710aef2e62 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -3084,7 +3084,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),