We didn't update buffer size according to read data.
Also, didn't update the total obj_size (was doing it only
for the second chunk being put, but for chunked input that
only had a single piece we ended up with zero obj_size). Also
remove assertion that second call to handle_data() means that
ofs > chunk size. This isn't true for chunked input.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
if (!ofs) {
first_chunk.claim(bl);
*phandle = NULL;
+ obj_len = (uint64_t)first_chunk.length();
return 0;
}
- assert (ofs >= RGW_MAX_CHUNK_SIZE);
int r = RGWPutObjProcessor_Aio::handle_data(bl, ofs, phandle);
return r;
len = read_len;
if (r < 0)
return ret;
- bl.append(bp);
+ bl.append(bp, 0, len);
}
if ((uint64_t)ofs + len > RGW_MAX_PUT_SIZE) {