]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: init some manifest fields when handling explicit objs 5677/head
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 26 Aug 2015 21:34:30 +0000 (14:34 -0700)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 26 Aug 2015 21:38:41 +0000 (14:38 -0700)
Fixes: #11455
When dealing with old manifest that has explicit objs, we also
need to set the head size and head object correctly so that
code that relies on this info doesn't break.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_rados.h

index 25caf2ca1234228ea443dce366a73fbe3058b127..9d5de6df9162a72596deec2b1f72576ec6f9aae9 100644 (file)
@@ -327,6 +327,12 @@ public:
       ::decode(rules, bl);
     } else {
       explicit_objs = true;
+      if (!objs.empty()) {
+        map<uint64_t, RGWObjManifestPart>::iterator iter = objs.begin();
+        head_obj = iter->second.loc;
+        head_size = iter->second.size;
+        max_head_size = head_size;
+      }
     }
 
     if (struct_v >= 4) {