]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix get_obj() with zero sized obj
authorYehuda Sadeh <yehuda@inktank.com>
Thu, 18 Apr 2013 20:30:45 +0000 (13:30 -0700)
committerYehuda Sadeh <yehuda@inktank.com>
Tue, 28 Jan 2014 17:38:01 +0000 (09:38 -0800)
Now that even zero sized objs have manifest a
test had to be modified.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
(cherry picked from commit 4fbf9a75e23428fabb2a4b5f52e015a81685cdda)

src/rgw/rgw_rados.cc

index 48c7b2a31df0739bf4aac5a9c4b731a01ba5608c..e12a517178fc23c083f2735904ae63f500c76f34 100644 (file)
@@ -2610,7 +2610,8 @@ int RGWRados::get_obj(void *ctx, void **handle, rgw_obj& obj,
   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),