]>
Commit | Line | Data |
---|---|---|
9f95a23c TL |
1 | // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- |
2 | // vim: ts=8 sw=2 smarttab | |
3 | ||
4 | #pragma once | |
5 | ||
6 | #include <iostream> | |
7 | #include <seastar/core/future.hh> | |
8 | ||
9 | #include "crimson/osd/osd_operation.h" | |
1e59de90 | 10 | #include "crimson/osd/osd_operations/peering_event.h" |
9f95a23c TL |
11 | #include "osd/osd_types.h" |
12 | #include "crimson/common/type_helpers.h" | |
9f95a23c TL |
13 | |
14 | namespace ceph { | |
15 | class Formatter; | |
16 | } | |
17 | ||
18 | namespace crimson::osd { | |
19 | ||
1e59de90 | 20 | class ShardServices; |
9f95a23c TL |
21 | class PG; |
22 | ||
1e59de90 | 23 | class PGAdvanceMap : public PhasedOperationT<PGAdvanceMap> { |
9f95a23c TL |
24 | public: |
25 | static constexpr OperationTypeCode type = OperationTypeCode::pg_advance_map; | |
26 | ||
27 | protected: | |
1e59de90 | 28 | ShardServices &shard_services; |
9f95a23c | 29 | Ref<PG> pg; |
1e59de90 | 30 | PipelineHandle handle; |
9f95a23c | 31 | |
1e59de90 | 32 | std::optional<epoch_t> from; |
9f95a23c TL |
33 | epoch_t to; |
34 | ||
35 | PeeringCtx rctx; | |
36 | const bool do_init; | |
37 | ||
38 | public: | |
39 | PGAdvanceMap( | |
1e59de90 | 40 | ShardServices &shard_services, Ref<PG> pg, epoch_t to, |
9f95a23c TL |
41 | PeeringCtx &&rctx, bool do_init); |
42 | ~PGAdvanceMap(); | |
43 | ||
44 | void print(std::ostream &) const final; | |
45 | void dump_detail(ceph::Formatter *f) const final; | |
46 | seastar::future<> start(); | |
1e59de90 TL |
47 | PipelineHandle &get_handle() { return handle; } |
48 | ||
49 | std::tuple< | |
50 | PGPeeringPipeline::Process::BlockingEvent | |
51 | > tracking_events; | |
9f95a23c TL |
52 | }; |
53 | ||
54 | } | |
1e59de90 TL |
55 | |
56 | #if FMT_VERSION >= 90000 | |
57 | template <> struct fmt::formatter<crimson::osd::PGAdvanceMap> : fmt::ostream_formatter {}; | |
58 | #endif |