#include "crimson/osd/osd.h"
#include "crimson/osd/osd_connection_priv.h"
+#include "crimson/osd/osd_operation_external_tracking.h"
#include "crimson/osd/pg.h"
namespace {
logger().debug("{} start", *this);
IRef ref = this;
- return with_blocking_future(handle.enter(cp().await_map))
- .then([this]() {
- return with_blocking_future(osd.osdmap_gate.wait_for_map(req->get_min_epoch()));
+ return enter_stage<>(cp().await_map).then([this] {
+ return with_blocking_event<OSD_OSDMapGate::OSDMapBlocker::BlockingEvent>(
+ [this] (auto&& trigger) {
+ return osd.osdmap_gate.wait_for_map(std::move(trigger),
+ req->get_min_epoch());
+ });
}).then([this](epoch_t epoch) {
- return with_blocking_future(handle.enter(cp().get_pg));
+ return enter_stage<>(cp().get_pg);
}).then([this] {
- return with_blocking_future(osd.wait_for_pg(req->get_spg()));
+ return with_blocking_event<PGMap::PGCreationBlockingEvent>(
+ [this] (auto&& trigger) {
+ return osd.wait_for_pg(std::move(trigger), req->get_spg());
+ });
}).then([this, ref=std::move(ref)](Ref<PG> pg) {
return interruptor::with_interruption([this, ref, pg] {
return pg->handle_rep_op(std::move(req));
#pragma once
#include "crimson/net/Connection.h"
+#include "crimson/osd/osdmap_gate.h"
#include "crimson/osd/osd_operation.h"
+#include "crimson/osd/pg_map.h"
#include "crimson/common/type_helpers.h"
class MOSDRepOp;
class RepRequest final : public PhasedOperationT<RepRequest> {
public:
class ConnectionPipeline {
- OrderedExclusivePhase await_map = {
- "RepRequest::ConnectionPipeline::await_map"
- };
- OrderedExclusivePhase get_pg = {
- "RepRequest::ConnectionPipeline::get_pg"
- };
+ struct AwaitMap : OrderedExclusivePhaseT<AwaitMap> {
+ static constexpr auto type_name =
+ "RepRequest::ConnectionPipeline::await_map";
+ } await_map;
+ struct GetPG : OrderedExclusivePhaseT<GetPG> {
+ static constexpr auto type_name =
+ "RepRequest::ConnectionPipeline::get_pg";
+ } get_pg;
friend RepRequest;
};
class PGPipeline {
- OrderedExclusivePhase await_map = {
- "RepRequest::PGPipeline::await_map"
- };
- OrderedExclusivePhase process = {
- "RepRequest::PGPipeline::process"
- };
+ struct AwaitMap : OrderedExclusivePhaseT<AwaitMap> {
+ static constexpr auto type_name = "RepRequest::PGPipeline::await_map";
+ } await_map;
+ struct Process : OrderedExclusivePhaseT<Process> {
+ static constexpr auto type_name = "RepRequest::PGPipeline::process";
+ } process;
friend RepRequest;
};
static constexpr OperationTypeCode type = OperationTypeCode::replicated_request;
void dump_detail(ceph::Formatter* f) const final;
seastar::future<> start();
+ std::tuple<
+ ConnectionPipeline::AwaitMap::BlockingEvent,
+ OSD_OSDMapGate::OSDMapBlocker::BlockingEvent,
+ ConnectionPipeline::GetPG::BlockingEvent,
+ PGMap::PGCreationBlockingEvent
+ > tracking_events;
+
private:
ConnectionPipeline &cp();
PGPipeline &pp(PG &pg);