Don't read the entire range from source object, read it in parts.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit
4049e47a0cfc1eef6efd502590b68ba7234589d3)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
return ret;
}
- bl_aux.copy(0, bl_aux.length(), bl);
+ bl.claim_append(bl_aux);
return ret;
}
if (!copy_source) {
len = get_data(data_in);
} else {
- op_ret = get_data(fst, lst, data_in);
+ uint64_t cur_lst = min(fst + s->cct->_conf->rgw_max_chunk_size - 1, lst);
+ op_ret = get_data(fst, cur_lst, data_in);
if (op_ret < 0)
goto done;
len = data_in.length();