]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: abstract sending MOSDPGPush during EC recovery
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 9 May 2024 19:07:32 +0000 (19:07 +0000)
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 1d54eaff41ec8d880bcf9149e4c71114e0ffdc09)

src/osd/ECBackend.cc
src/osd/ECCommon.h
src/osd/ECListener.h
src/osd/PrimaryLogPG.h
src/test/osd/TestECBackend.cc

index b1ed418d388edb8cfa44e8f2a3e24ad6264fef93..51f785af7e430cffe9d2d5a5a6dc874bc6dd0c3a 100644 (file)
@@ -490,10 +490,7 @@ void ECCommon::RecoveryBackend::dispatch_recovery_messages(
     msg->pushes.swap(i->second);
     msg->compute_cost(cct);
     msg->is_repair = get_parent()->pg_is_repair();
-    std::vector wrapped_msg{
-      std::make_pair(i->first.osd, static_cast<Message*>(msg))
-    };
-    get_parent()->send_message_osd_cluster(wrapped_msg, msg->map_epoch);
+    get_parent()->send_message_osd_cluster(i->first.osd, msg, msg->map_epoch);
   }
   std::map<int, MOSDPGPushReply*> replies;
   for (map<pg_shard_t, vector<PushReplyOp>>::iterator i =
index 462e10a971b7f8c6a148beb51df4e02993932817..66fbfde7398c9e5d62e4710dac56d3bb0d081244 100644 (file)
@@ -21,6 +21,8 @@
 #include "erasure-code/ErasureCodeInterface.h"
 #include "ECUtil.h"
 #include "ECTypes.h"
+#include "messages/MOSDPGPushReply.h"
+#include "msg/MessageRef.h"
 #if WITH_CRIMSON
 #include "crimson/osd/object_context.h"
 #include "os/Transaction.h"
index 76fd03c6d6625d6d592dea6661bc55328345541d..fd9e37a682fe42350d3dcdd342e170a02baa01b6 100644 (file)
@@ -18,6 +18,7 @@
 #include "OSDMap.h"
 #include "common/WorkQueue.h"
 #include "PGLog.h"
+#include "messages/MOSDPGPush.h"
 
 // ECListener -- an interface decoupling the pipelines from
 // particular implementation of ECBackendL (crimson vs cassical).
@@ -142,6 +143,8 @@ struct ECListener {
   // XXX
   virtual void send_message_osd_cluster(
     std::vector<std::pair<int, Message*>>& messages, epoch_t from_epoch) = 0;
+  virtual void send_message_osd_cluster(
+    int osd, MOSDPGPush* msg, epoch_t from_epoch) = 0;
 
   virtual std::ostream& gen_dbg_prefix(std::ostream& out) const = 0;
 
index cd62052ef307f2868ae1f4ef935e438c4940c226..7418c3fd27f57a8dce82422d57f589b588c7d250 100644 (file)
@@ -612,6 +612,13 @@ public:
     int peer, Message *m, epoch_t from_epoch) override {
     osd->send_message_osd_cluster(peer, m, from_epoch);
   }
+  void send_message_osd_cluster(
+    int osd, MOSDPGPush* msg, epoch_t from_epoch) override {
+    std::vector wrapped_msg {
+      std::make_pair(osd, static_cast<Message*>(msg))
+    };
+    send_message_osd_cluster(wrapped_msg, from_epoch);
+  }
   void send_message_osd_cluster(
     std::vector<std::pair<int, Message*>>& messages, epoch_t from_epoch) override {
     osd->send_message_osd_cluster(messages, from_epoch);
index a554fe4c94e8e53167913f5b9c422e55ed2a6d46..c7e6e585a7f0d497aec3950ae28b2947d26f49b0 100644 (file)
@@ -461,6 +461,10 @@ public:
 
   }
 
+  void send_message_osd_cluster(int osd, MOSDPGPush* msg, epoch_t from_epoch) override {
+
+  }
+
   ostream &gen_dbg_prefix(ostream &out) const override {
     out << dbg_prefix;
     return out;