]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 13 Aug 2025 19:20:22 +0000 (19:20 +0000)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/osd/ECBackend.cc
src/osd/ECCommon.h
src/osd/ECListener.h
src/osd/PrimaryLogPG.h
src/test/osd/TestECBackend.cc

index 2d56e180ae0f440941d45f82e13cba5ca5435de5..09998b74e6ca1a63e80345ab240c00cfa52edc07 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 7055318fba929737a4c5b3a948a1e10588952bbe..ac9048d866f68487cdc5b3e8afcc013c8deff33a 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 3dcaaa9b46bdd831b23500ee3cec1703e2b7b2e3..d41ee4641f48502caba09a3946608fa95dc85f48 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 ca299abd9631108574b410788c3b46a4cfbe9c40..c134ac042a42253b3e625d4717bdca1a96215cf4 100644 (file)
@@ -462,6 +462,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;