Skip to content

Commit

Permalink
rgw: init some manifest fields when handling explicit objs
Browse files Browse the repository at this point in the history
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 d7bf8cb)
  • Loading branch information
yehudasa authored and ktdreyer committed Oct 13, 2016
1 parent 7b6fe8e commit 3b6d2ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/rgw/rgw_rados.h
Expand Up @@ -327,6 +327,12 @@ class RGWObjManifest {
::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) {
Expand Down

1 comment on commit 3b6d2ab

@gregsfortytwo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember that we're trying to include tracker URLs instead of issue numbers — this is now linked to #11455 because of Github's matching. :o

Please sign in to comment.