]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: just shuffle RecoveryMessages to ECCommon.h
authorRadosław Zarzyński <rzarzyns@redhat.com>
Wed, 27 Sep 2023 12:17:06 +0000 (14:17 +0200)
committerAlex Ainscow <aainscow@uk.ibm.com>
Wed, 17 Sep 2025 08:43:25 +0000 (09:43 +0100)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
(cherry picked from commit bc28c16a9a83b0f12d3d6463eaeacbab40b0890b)

src/osd/ECBackend.cc
src/osd/ECCommon.h

index 297264c6bac6ddccd31e62411588ba95a4f72d0e..7bc6b28649a8777287d815e941facaf80744be41 100644 (file)
@@ -142,20 +142,6 @@ void ECBackend::RecoveryBackend::_failed_push(const hobject_t &hoid,
   get_parent()->on_failed_pull(fl, hoid, v);
 }
 
-struct RecoveryMessages {
-  std::map<hobject_t, ECCommon::read_request_t> recovery_reads;
-
-  void recovery_read(const hobject_t &hoid,
-                     const ECCommon::read_request_t &read_request) {
-    ceph_assert(!recovery_reads.count(hoid));
-    recovery_reads.insert(std::make_pair(hoid, read_request));
-  }
-
-  std::map<pg_shard_t, std::vector<PushOp>> pushes;
-  std::map<pg_shard_t, std::vector<PushReplyOp>> push_replies;
-  ceph::os::Transaction t;
-};
-
 void ECBackend::handle_recovery_push(
   const PushOp &op,
   RecoveryMessages *m,
index 59c3d78de0cbee967e0cee342456f6720dbb4143..dc1496b25572300d84bf1e1edddae953cab49f03 100644 (file)
@@ -798,6 +798,33 @@ struct ECCommon {
 
 };
 
+struct RecoveryMessages {
+  std::map<hobject_t, ECCommon::read_request_t> recovery_reads;
+
+  void recovery_read(const hobject_t &hoid,
+                     const ECCommon::read_request_t &read_request) {
+    ceph_assert(!recovery_reads.count(hoid));
+    recovery_reads.insert(std::make_pair(hoid, read_request));
+  }
+
+  std::map<pg_shard_t, std::vector<PushOp>> pushes;
+  std::map<pg_shard_t, std::vector<PushReplyOp>> push_replies;
+  ceph::os::Transaction t;
+};
+
+template <>
+struct fmt::formatter<ECCommon::read_request_t> : fmt::ostream_formatter {};
+
+template <>
+struct fmt::formatter<ECCommon::read_result_t> : fmt::ostream_formatter {};
+
+template <>
+struct fmt::formatter<ECCommon::ReadOp> : fmt::ostream_formatter {};
+
+template <>
+struct fmt::formatter<ECCommon::RMWPipeline::Op> : fmt::ostream_formatter {};
+
+
 template <class F, class G>
 void ECCommon::ReadPipeline::check_recovery_sources(
     const OSDMapRef &osdmap,
@@ -886,15 +913,3 @@ void ECCommon::ReadPipeline::filter_read_op(
     on_schedule_recovery(op);
   }
 }
-
-template <>
-struct fmt::formatter<ECCommon::read_request_t> : fmt::ostream_formatter {};
-
-template <>
-struct fmt::formatter<ECCommon::read_result_t> : fmt::ostream_formatter {};
-
-template <>
-struct fmt::formatter<ECCommon::ReadOp> : fmt::ostream_formatter {};
-
-template <>
-struct fmt::formatter<ECCommon::RMWPipeline::Op> : fmt::ostream_formatter {};