adjust the manifest head object:
- when reading manifest, set the head object to the object
we read the manifest from (and its size). Some manifests are
broken and point at a different object
- when copying multipart object, set the manifest head object to
point at the new head object
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit
419264586fc46337322f0d60b0ffcdcce3bb5c5a)
}
pmanifest->set_head(dest_obj, first_chunk.length());
+ } else {
+ pmanifest->set_head(dest_obj, 0);
}
write_op.meta.data = &first_chunk;
try {
::decode(s->manifest, miter);
s->has_manifest = true;
+ s->manifest.set_head(obj, s->size); /* patch manifest to reflect the head we just read, some manifests might be
+ broken due to old bugs */
s->size = s->manifest.get_obj_size();
} catch (buffer::error& err) {
ldout(cct, 20) << "ERROR: couldn't decode manifest" << dendl;