int RGWPutObj_Compress::handle_data(bufferlist& bl, off_t ofs, void **phandle, rgw_obj *pobj, bool *again)
{
bufferlist in_bl;
-
+ if (*again) {
+ return next->handle_data(in_bl, ofs, phandle, pobj, again);
+ }
if (bl.length() > 0) {
// compression stuff
if ((ofs > 0 && compressed) || // if previous part was compressed
}
// end of compression stuff
}
-
return next->handle_data(in_bl, ofs, phandle, pobj, again);
}
first_data = false;
cur_ofs += bl_len;
+
return next->handle_data(out_bl, bl_ofs, out_bl.length() - bl_ofs);
}
int RGWPutObjProcessor_Atomic::handle_data(bufferlist& bl, off_t ofs, void **phandle, rgw_obj *pobj, bool *again)
{
- *again = false;
*phandle = NULL;
uint64_t max_write_size = MIN(max_chunk_size, (uint64_t)next_part_ofs - data_ofs);
pending_data_bl.claim_append(bl);
- if (pending_data_bl.length() < max_write_size)
+ if (pending_data_bl.length() < max_write_size) {
+ *again = false;
return 0;
+ }
pending_data_bl.splice(0, max_write_size, &bl);