case object_manifest_t::TYPE_CHUNKED:
{
if (can_proxy_chunked_read(op, obc)) {
+ map<hobject_t,FlushOpRef>::iterator p = flush_ops.find(obc->obs.oi.soid);
+ if (p != flush_ops.end()) {
+ do_proxy_chunked_op(op, obc->obs.oi.soid, obc, true);
+ return cache_result_t::HANDLED_PROXY;
+ }
do_proxy_chunked_op(op, obc->obs.oi.soid, obc, write_ordered);
return cache_result_t::HANDLED_PROXY;
}
dout(20) << __func__ << " chunk_index: " << chunks->first
<< " next_length: " << chunks->second << " cursor: "
<< p.first << dendl;
- do_proxy_chunked_read(op, obc, i, chunks->first, p.first, chunks->second, req_len);
+ do_proxy_chunked_read(op, obc, i, chunks->first, p.first, chunks->second, req_len, write_ordered);
}
}
}
void PrimaryLogPG::do_proxy_chunked_read(OpRequestRef op, ObjectContextRef obc, int op_index,
uint64_t chunk_index, uint64_t req_offset, uint64_t req_length,
- uint64_t req_total_len)
+ uint64_t req_total_len, bool write_ordered)
{
MOSDOp *m = static_cast<MOSDOp*>(op->get_nonconst_req());
object_manifest_t *manifest = &obc->obs.oi.manifest;
hobject_t ori_soid = m->get_hobj();
object_locator_t oloc(soid);
unsigned flags = CEPH_OSD_FLAG_IGNORE_CACHE | CEPH_OSD_FLAG_IGNORE_OVERLAY;
+ if (write_ordered) {
+ flags |= CEPH_OSD_FLAG_RWORDERED;
+ }
if (!chunk_length || soid == hobject_t()) {
return;
ObjectContextRef obc, bool write_ordered);
void do_proxy_chunked_read(OpRequestRef op, ObjectContextRef obc, int op_index,
uint64_t chunk_index, uint64_t req_offset, uint64_t req_length,
- uint64_t req_total_len);
+ uint64_t req_total_len, bool write_ordered);
bool can_proxy_chunked_read(OpRequestRef op, ObjectContextRef obc);
void _copy_some_manifest(ObjectContextRef obc, CopyOpRef cop, uint64_t start_offset);
void process_copy_chunk_manifest(hobject_t oid, ceph_tid_t tid, int r, uint64_t offset);