write_iertr::future<> handle_rep_write_reply(ECSubWriteReply&& op);
ll_read_ierrorator::future<> handle_rep_read_op(Ref<MOSDECSubOpRead>);
ll_read_ierrorator::future<> handle_rep_read_reply(Ref<MOSDECSubOpReadReply>);
+
private:
+ friend class ECRecoveryBackend;
+
ll_read_ierrorator::future<ceph::bufferlist>
_read(const hobject_t& hoid, uint64_t off, uint64_t len, uint32_t flags) override;
rep_op_fut_t
#include <seastar/core/future.hh>
#include <seastar/core/do_with.hh>
+#include "crimson/osd/ec_backend.h"
#include "crimson/osd/ec_recovery_backend.h"
#include "crimson/osd/pg.h"
#include "crimson/osd/pg_backend.h"
}
}
+ECRecoveryBackend::ECRecoveryBackend(
+ crimson::osd::PG& pg,
+ crimson::osd::ShardServices& shard_services,
+ crimson::os::CollectionRef coll,
+ ECBackend* backend)
+: ::RecoveryBackend(pg, shard_services, coll, backend),
+ ::ECCommon::RecoveryBackend(
+ shard_services.get_cct(),
+ coll->get_cid(),
+ backend->ec_impl,
+ backend->sinfo,
+ backend->read_pipeline,
+ &pg)
+{}
+
RecoveryBackend::interruptible_future<>
ECRecoveryBackend::recover_object(
const hobject_t& soid,
return seastar::now();
}
+void ECRecoveryBackend::commit_txn_send_replies(
+ ceph::os::Transaction&& txn,
+ std::map<int, MOSDPGPushReply*> replies)
+{
+}
+
RecoveryBackend::interruptible_future<>
ECRecoveryBackend::handle_push(
Ref<MOSDPGPush> m)
return handle_push(boost::static_pointer_cast<MOSDPGPush>(m));
case MSG_OSD_PG_PUSH_REPLY:
return handle_push_reply(
- boost::static_pointer_cast<MOSDPGPushReply>(m));
+ boost::static_pointer_cast<MOSDPGPushReply>(m));
default:
// delegate to parent class for handling backend-agnostic recovery ops.
- return RecoveryBackend::handle_recovery_op(std::move(m), conn);
+ return ::RecoveryBackend::handle_recovery_op(std::move(m), conn);
}
}
#include "messages/MOSDPGPush.h"
#include "messages/MOSDPGPushReply.h"
#include "messages/MOSDPGScan.h"
+#include "osd/ECCommon.h"
#include "osd/recovery_types.h"
#include "osd/osd_types.h"
class PGBackend;
-class ECRecoveryBackend : public RecoveryBackend {
+class ECRecoveryBackend : public RecoveryBackend,
+ private ECCommon::RecoveryBackend {
public:
ECRecoveryBackend(crimson::osd::PG& pg,
crimson::osd::ShardServices& shard_services,
crimson::os::CollectionRef coll,
- PGBackend* backend)
- : RecoveryBackend(pg, shard_services, coll, backend)
- {}
+ ECBackend* backend);
interruptible_future<> handle_recovery_op(
Ref<MOSDFastDispatchOp> m,
}
private:
+ void commit_txn_send_replies(
+ ceph::os::Transaction&& txn,
+ std::map<int, MOSDPGPushReply*> replies) override;
+
interruptible_future<> handle_push(
Ref<MOSDPGPush> m);
interruptible_future<> handle_push_reply(
#include "crimson/common/coroutine.h"
#include "crimson/common/exception.h"
#include "crimson/common/log.h"
+#include "crimson/osd/ec_backend.h"
#include "crimson/osd/ec_recovery_backend.h"
#include "crimson/osd/recovery_backend.h"
#include "crimson/osd/replicated_recovery_backend.h"
pg, shard_services, coll, backend);
case pg_pool_t::TYPE_ERASURE:
return std::make_unique<ECRecoveryBackend>(
- pg, shard_services, coll, backend);
+ pg, shard_services, coll, static_cast<ECBackend*>(backend));
default:
ceph_abort_msg(seastar::format(
"unsupported pool type '{}'", pool.type));