If the head object contains data, need to set it in the list of
objs (in addition to being pointed at by head_obj).
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit
1e012112b99004745952accc6fb11ada5e8e0045)
bucket = _b;
manifest->set_tail_bucket(_b);
- manifest->set_head(_h);
+ manifest->set_head(_h, 0);
last_ofs = 0;
if (manifest->get_prefix().empty()) {
goto done_ret;
}
- pmanifest->set_head(dest_obj);
- pmanifest->set_head_size(first_chunk.length());
+ pmanifest->set_head(dest_obj, first_chunk.length());
}
write_op.meta.data = &first_chunk;
return (obj_size > head_size);
}
- void set_head(const rgw_obj& _o) {
+ void set_head(const rgw_obj& _o, uint64_t _s) {
head_obj = _o;
+ head_size = _s;
+
+ if (explicit_objs && head_size > 0) {
+ objs[0].loc = head_obj;
+ objs[0].size = head_size;
+ }
}
const rgw_obj& get_head() {