From d7bf8cb594e5276d1c80544f5ec954d52b159750 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 --- 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 25caf2ca12342..9d5de6df9162a 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.39.5