]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: migrate PGAdvanceMap to new tracking infra.
authorRadosław Zarzyński <rzarzyns@redhat.com>
Fri, 15 Apr 2022 16:10:20 +0000 (18:10 +0200)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Thu, 5 May 2022 02:06:31 +0000 (04:06 +0200)
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
src/crimson/osd/osd_operation_external_tracking.h
src/crimson/osd/osd_operations/pg_advance_map.cc
src/crimson/osd/osd_operations/pg_advance_map.h

index 1076fdf52ea30a5559b36c75ffde7f6e3b2a6421..b7b56a9a1474de20ddca968649d6c7134134c78d 100644 (file)
@@ -8,6 +8,7 @@
 #include "crimson/osd/osd_operations/client_request.h"
 #include "crimson/osd/osd_operations/compound_peering_request.h"
 #include "crimson/osd/osd_operations/peering_event.h"
+#include "crimson/osd/osd_operations/pg_advance_map.h"
 #include "crimson/osd/osd_operations/recovery_subrequest.h"
 #include "crimson/osd/osd_operations/replicated_request.h"
 #include "crimson/osd/pg_activation_blocker.h"
@@ -169,4 +170,11 @@ struct EventBackendRegistry<osd::BackfillRecovery> {
   }
 };
 
+template <>
+struct EventBackendRegistry<osd::PGAdvanceMap> {
+  static std::tuple<> get_backends() {
+    return {};
+  }
+};
+
 } // namespace crimson
index 5257b7ce4dc7b3f884af8caf1958743adda2af5a..285c4ff16ce07ffa6c78a8f581dce7fe3a5c178b 100644 (file)
@@ -1,8 +1,6 @@
 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
 // vim: ts=8 sw=2 smarttab
 
-#include "crimson/osd/osd_operations/pg_advance_map.h"
-
 #include <boost/smart_ptr/local_shared_ptr.hpp>
 #include <seastar/core/future.hh>
 
@@ -10,6 +8,9 @@
 #include "common/Formatter.h"
 #include "crimson/osd/pg.h"
 #include "crimson/osd/osd.h"
+#include "crimson/osd/osd_operations/pg_advance_map.h"
+#include "crimson/osd/osd_operation_external_tracking.h"
+#include "osd/PeeringState.h"
 
 namespace {
   seastar::logger& logger() {
@@ -56,9 +57,9 @@ seastar::future<> PGAdvanceMap::start()
   logger().debug("{}: start", *this);
 
   IRef ref = this;
-  return with_blocking_future(
-    handle.enter(pg->peering_request_pg_pipeline.process))
-  .then([this] {
+  return enter_stage<>(
+    pg->peering_request_pg_pipeline.process
+  ).then([this] {
     if (do_init) {
       pg->handle_initialize(rctx);
       pg->handle_activate_map(rctx);
index 10ef641b99949980a82a0ed2162cafc8f9580d20..b925f6d369c408e56f71fe0240b926c4b13fc2f7 100644 (file)
@@ -7,9 +7,9 @@
 #include <seastar/core/future.hh>
 
 #include "crimson/osd/osd_operation.h"
+#include "crimson/osd/osd_operations/peering_event.h"
 #include "osd/osd_types.h"
 #include "crimson/common/type_helpers.h"
-#include "osd/PeeringState.h"
 
 namespace ceph {
   class Formatter;
@@ -43,6 +43,10 @@ public:
   void print(std::ostream &) const final;
   void dump_detail(ceph::Formatter *f) const final;
   seastar::future<> start();
+
+  std::tuple<
+    PeeringEvent::PGPipeline::Process::BlockingEvent
+  > tracking_events;
 };
 
 }