pg_shard_t from,
OpRequestRef msg,
ECSubWrite &op,
- const ZTracer::Trace &trace,
- Context *on_local_applied_sync)
+ const ZTracer::Trace &trace)
{
if (msg)
msg->mark_started();
ec_impl->get_data_chunk_count())
op.t.set_fadvise_flag(CEPH_OSD_OP_FLAG_FADVISE_DONTNEED);
- if (on_local_applied_sync) {
- dout(10) << "Queueing onreadable_sync: " << on_local_applied_sync << dendl;
- localt.register_on_applied_sync(on_local_applied_sync);
- }
localt.register_on_commit(
get_parent()->bless_context(
new SubWriteCommitted(
const eversion_t &roll_forward_to,
const vector<pg_log_entry_t> &log_entries,
boost::optional<pg_hit_set_history_t> &hset_history,
- Context *on_local_applied_sync,
Context *on_all_applied,
Context *on_all_commit,
ceph_tid_t tid,
op->roll_forward_to = std::max(roll_forward_to, committed_to);
op->log_entries = log_entries;
std::swap(op->updated_hit_set_history, hset_history);
- op->on_local_applied_sync = on_local_applied_sync;
op->on_all_applied = on_all_applied;
op->on_all_commit = on_all_commit;
op->tid = tid;
dout(10) << __func__ << ": op " << *op << " starting" << dendl;
start_rmw(op, std::move(t));
- dout(10) << "onreadable_sync: " << op->on_local_applied_sync << dendl;
}
void ECBackend::call_write_ordered(std::function<void(void)> &&cb) {
op->remote_read.clear();
op->remote_read_result.clear();
- dout(10) << "onreadable_sync: " << op->on_local_applied_sync << dendl;
ObjectStore::Transaction empty;
bool should_write_local = false;
ECSubWrite local_write_op;
}
}
if (should_write_local) {
- handle_sub_write(
- get_parent()->whoami_shard(),
- op->client_op,
- local_write_op,
- op->trace,
- op->on_local_applied_sync);
- op->on_local_applied_sync = 0;
+ handle_sub_write(
+ get_parent()->whoami_shard(),
+ op->client_op,
+ local_write_op,
+ op->trace);
}
for (auto i = op->on_write.begin();
pg_shard_t from,
OpRequestRef msg,
ECSubWrite &op,
- const ZTracer::Trace &trace,
- Context *on_local_applied_sync = 0
+ const ZTracer::Trace &trace
);
void handle_sub_read(
pg_shard_t from,
const eversion_t &roll_forward_to,
const vector<pg_log_entry_t> &log_entries,
boost::optional<pg_hit_set_history_t> &hset_history,
- Context *on_local_applied_sync,
Context *on_all_applied,
Context *on_all_commit,
ceph_tid_t tid,
ExtentCache::write_pin pin;
/// Callbacks
- Context *on_local_applied_sync = nullptr;
Context *on_all_applied = nullptr;
Context *on_all_commit = nullptr;
~Op() {
- delete on_local_applied_sync;
delete on_all_applied;
delete on_all_commit;
}
const vector<pg_log_entry_t> &log_entries, ///< [in] log entries for t
/// [in] hitset history (if updated with this transaction)
boost::optional<pg_hit_set_history_t> &hset_history,
- Context *on_local_applied_sync, ///< [in] called when applied locally
Context *on_all_applied, ///< [in] called when all acked
Context *on_all_commit, ///< [in] called when all commit
ceph_tid_t tid, ///< [in] tid
const eversion_t &roll_forward_to,
const vector<pg_log_entry_t> &_log_entries,
boost::optional<pg_hit_set_history_t> &hset_history,
- Context *on_local_applied_sync,
Context *on_all_acked,
Context *on_all_commit,
ceph_tid_t tid,
true,
op_t);
- op_t.register_on_applied_sync(on_local_applied_sync);
op_t.register_on_applied(
parent->bless_context(
new C_OSD_OnOpApplied(this, &op)));