From b80859e2b2efc2402dc62aa319e40319863586f7 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Wed, 26 Aug 2015 14:34:30 -0700 Subject: [PATCH] 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) --- src/rgw/rgw_rados.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index 18213cf3a54..04bf51c35b0 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) { -- 2.47.3