]> git-server-git.apps.pok.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:40:18 +0000 (09:40 -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 5ca27a06a0369d93fbd9cf97da3f4a73634a5309..39db566f995346fc36f654dbb78845caca505780 100644 (file)
@@ -2669,7 +2669,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),