OpRequestRef client_op
)
{
- ceph_assert(!rmw_pipeline.tid_to_op_map.count(tid));
- auto concrete_op = std::make_unique<ECClassicalOp>();
- concrete_op->t = std::move(t);
- rmw_pipeline.tid_to_op_map[tid] = std::move(concrete_op);
- RMWPipeline::Op *op = rmw_pipeline.tid_to_op_map[tid].get();
+ auto op = std::make_unique<ECClassicalOp>();
+ op->t = std::move(t);
op->hoid = hoid;
op->delta_stats = delta_stats;
op->version = at_version;
}
op->plan = op->get_write_plan(
sinfo,
- *(concrete_op->t),
+ *(op->t),
[&](const hobject_t &i) {
ECUtil::HashInfoRef ref = get_hash_info(i, true);
if (!ref) {
},
get_parent()->get_dpp());
dout(10) << __func__ << ": op " << *op << " starting" << dendl;
- rmw_pipeline.start_rmw(op);
+ rmw_pipeline.start_rmw(std::move(op));
}
void ECBackend::RMWPipeline::call_write_ordered(std::function<void(void)> &&cb) {
return ref;
}
-void ECBackend::RMWPipeline::start_rmw(Op *op)
+void ECBackend::RMWPipeline::start_rmw(OpRef op)
{
ceph_assert(op);
dout(10) << __func__ << ": " << *op << dendl;
+ ceph_assert(!tid_to_op_map.count(op->tid));
waiting_state.push_back(*op);
+ tid_to_op_map[op->tid] = std::move(op);
check_ops();
}
op_list waiting_commit; /// writes waiting on initial commit
eversion_t completed_to;
eversion_t committed_to;
- void start_rmw(Op *op);
+ void start_rmw(OpRef op);
bool try_state_to_reads();
bool try_reads_to_commit();
bool try_finish_rmw();