1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
6 #include "crimson/net/Connection.h"
7 #include "crimson/osd/osdmap_gate.h"
8 #include "crimson/osd/osd_operation.h"
9 #include "crimson/osd/osd_operations/client_request.h"
10 #include "crimson/osd/pg_map.h"
11 #include "crimson/common/type_helpers.h"
12 #include "messages/MOSDPGUpdateLogMissingReply.h"
18 namespace crimson::osd
{
25 class LogMissingRequestReply final
: public PhasedOperationT
<LogMissingRequestReply
> {
27 static constexpr OperationTypeCode type
= OperationTypeCode::logmissing_request_reply
;
28 LogMissingRequestReply(crimson::net::ConnectionRef
&&, Ref
<MOSDPGUpdateLogMissingReply
>&&);
30 void print(std::ostream
&) const final
;
31 void dump_detail(ceph::Formatter
* f
) const final
;
33 static constexpr bool can_create() { return false; }
34 spg_t
get_pgid() const {
35 return req
->get_spg();
37 PipelineHandle
&get_handle() { return handle
; }
38 epoch_t
get_epoch() const { return req
->get_min_epoch(); }
40 ConnectionPipeline
&get_connection_pipeline();
41 seastar::future
<crimson::net::ConnectionFRef
> prepare_remote_submission() {
43 return conn
.get_foreign(
44 ).then([this](auto f_conn
) {
49 void finish_remote_submission(crimson::net::ConnectionFRef _conn
) {
51 conn
= make_local_shared_foreign(std::move(_conn
));
54 seastar::future
<> with_pg(
55 ShardServices
&shard_services
, Ref
<PG
> pg
);
59 ConnectionPipeline::AwaitActive::BlockingEvent
,
60 ConnectionPipeline::AwaitMap::BlockingEvent
,
61 ConnectionPipeline::GetPG::BlockingEvent
,
62 PGMap::PGCreationBlockingEvent
,
63 OSD_OSDMapGate::OSDMapBlocker::BlockingEvent
67 ClientRequest::PGPipeline
&pp(PG
&pg
);
69 crimson::net::ConnectionRef conn
;
70 // must be after `conn` to ensure the ConnectionPipeline's is alive
71 PipelineHandle handle
;
72 Ref
<MOSDPGUpdateLogMissingReply
> req
;
77 #if FMT_VERSION >= 90000
78 template <> struct fmt::formatter
<crimson::osd::LogMissingRequestReply
> : fmt::ostream_formatter
{};