]>
git.proxmox.com Git - ceph.git/blob - ceph/src/crimson/osd/osd_operations/logmissing_request.h
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/MOSDPGUpdateLogMissing.h"
18 namespace crimson::osd
{
25 class LogMissingRequest final
: public PhasedOperationT
<LogMissingRequest
> {
27 static constexpr OperationTypeCode type
= OperationTypeCode::logmissing_request
;
28 LogMissingRequest(crimson::net::ConnectionRef
&&, Ref
<MOSDPGUpdateLogMissing
>&&);
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 ClientRequest::PGPipeline::AwaitMap::BlockingEvent
,
63 PG_OSDMapGate::OSDMapBlocker::BlockingEvent
,
64 PGMap::PGCreationBlockingEvent
,
65 OSD_OSDMapGate::OSDMapBlocker::BlockingEvent
69 ClientRequest::PGPipeline
&client_pp(PG
&pg
);
71 crimson::net::ConnectionRef conn
;
72 // must be after `conn` to ensure the ConnectionPipeline's is alive
73 PipelineHandle handle
;
74 Ref
<MOSDPGUpdateLogMissing
> req
;
79 #if FMT_VERSION >= 90000
80 template <> struct fmt::formatter
<crimson::osd::LogMissingRequest
> : fmt::ostream_formatter
{};