]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: init some manifest fields when handling explicit objs
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 26 Aug 2015 21:34:30 +0000 (14:34 -0700)
committerKen Dreyer <kdreyer@redhat.com>
Tue, 15 Sep 2015 17:05:58 +0000 (11:05 -0600)
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>
(cherry picked from commit d7bf8cb594e5276d1c80544f5ec954d52b159750)

src/rgw/rgw_rados.h

index 23c28e5a8c81997b0fac49eac3b3e98091708b98..c5bdbb076fdca243258ae100ca8c1a0b7f917dc1 100644 (file)
@@ -269,6 +269,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) {