}
ECCrimsonOp(ceph::os::Transaction&& t,
- crimson::osd::ObjectContextRef &&obc)
- : t(transate_transaction(std::move(t), std::move(obc))) {
+ crimson::osd::ObjectContextRef &&obc,
+ ECCommon::RMWPipeline& rmw_pipeline)
+ : Op(rmw_pipeline),
+ t(transate_transaction(std::move(t), std::move(obc))) {
}
void generate_transactions(
const OSDMapRef &osdmap) final
{
assert(t);
-#if 1
ECTransaction::generate_transactions(
t.get(),
plan,
&temp_cleared,
dpp,
osdmap);
-#endif
}
bool skip_transaction(
std::vector<pg_log_entry_t>&& log_entries)
{
const hobject_t& hoid = obc->obs.oi.soid;
- logger().debug("ECBackend::{} hoid={}", __func__, hoid);
- auto op = std::make_unique<ECCrimsonOp>(std::move(txn), std::move(obc));
+ logger().debug("{} hoid={} obc->attr_cache={}", __func__, hoid, obc->attr_cache);
+ auto op =
+ std::make_unique<ECCrimsonOp>(std::move(txn), std::move(obc), rmw_pipeline);
op->hoid = hoid;
//op->delta_stats = delta_stats;
op->version = osd_op_p.at_version;
}
struct ECDummyOp final : ECCommon::RMWPipeline::Op {
+ ECDummyOp(ECCommon::RMWPipeline &rmw_pipeline)
+ : Op(rmw_pipeline) {
+ }
+
void generate_transactions(
ceph::ErasureCodeInterfaceRef &ec_impl,
pg_t pgid,
dout(20) << __func__ << " cache idle " << op->version << dendl;
// submit a dummy, transaction-empty op to kick the rollforward
const auto tid = get_parent()->get_tid();
- const auto nop = std::make_shared<ECDummyOp>();
+ const auto nop = std::make_shared<ECDummyOp>(*this);
nop->hoid = op->hoid;
nop->trim_to = op->trim_to;
nop->pg_committed_to = op->version;
std::list<ECExtentCache::OpRef> cache_ops;
RMWPipeline *pipeline;
+ Op(RMWPipeline &pipeline) : tid(), plan(), pipeline(&pipeline) {}
+#ifndef WITH_CRIMSON
Op() : tid(), plan(), pipeline(nullptr) {}
+#endif
/// Callbacks
Context *on_all_commit = nullptr;