]> git.apps.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>
Wed, 23 Sep 2015 20:37:40 +0000 (14:37 -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 18213cf3a549922087644f5f34646115d421f6d9..04bf51c35b09968a51f24fa08ff15f0f366afced 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) {