summaryrefslogtreecommitdiffstats
path: root/src/crimson/osd/osd_operations/recovery_subrequest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/crimson/osd/osd_operations/recovery_subrequest.cc')
-rw-r--r--src/crimson/osd/osd_operations/recovery_subrequest.cc46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/crimson/osd/osd_operations/recovery_subrequest.cc b/src/crimson/osd/osd_operations/recovery_subrequest.cc
new file mode 100644
index 000000000..68655b8da
--- /dev/null
+++ b/src/crimson/osd/osd_operations/recovery_subrequest.cc
@@ -0,0 +1,46 @@
+#include <fmt/format.h>
+#include <fmt/ostream.h>
+
+#include "crimson/osd/osd_operations/recovery_subrequest.h"
+#include "crimson/osd/pg.h"
+#include "crimson/osd/osd_connection_priv.h"
+
+namespace {
+ seastar::logger& logger() {
+ return crimson::get_logger(ceph_subsys_osd);
+ }
+}
+
+namespace crimson {
+ template <>
+ struct EventBackendRegistry<osd::RecoverySubRequest> {
+ static std::tuple<> get_backends() {
+ return {};
+ }
+ };
+}
+
+namespace crimson::osd {
+
+seastar::future<> RecoverySubRequest::with_pg(
+ ShardServices &shard_services, Ref<PG> pgref)
+{
+ logger().debug("{}: {}", "RecoverySubRequest::with_pg", *this);
+
+ track_event<StartEvent>();
+ IRef opref = this;
+ return interruptor::with_interruption([this, pgref] {
+ return pgref->get_recovery_backend()->handle_recovery_op(m, conn);
+ }, [](std::exception_ptr) {
+ return seastar::now();
+ }, pgref).finally([this, opref, pgref] {
+ track_event<CompletionEvent>();
+ });
+}
+
+ConnectionPipeline &RecoverySubRequest::get_connection_pipeline()
+{
+ return get_osd_priv(conn.get()).peering_request_conn_pipeline;
+}
+
+}