From: Yehuda Sadeh Date: Wed, 26 Aug 2015 21:34:30 +0000 (-0700) Subject: rgw: init some manifest fields when handling explicit objs X-Git-Tag: v0.94.4~51^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b80859e2b2efc2402dc62aa319e40319863586f7;p=ceph.git rgw: init some manifest fields when handling explicit objs 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 (cherry picked from commit d7bf8cb594e5276d1c80544f5ec954d52b159750) --- diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index 18213cf3a549..04bf51c35b09 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -327,6 +327,12 @@ public: ::decode(rules, bl); } else { explicit_objs = true; + if (!objs.empty()) { + map::iterator iter = objs.begin(); + head_obj = iter->second.loc; + head_size = iter->second.size; + max_head_size = head_size; + } } if (struct_v >= 4) {