]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: settle ECRecoveryBackend -- local MOSDPGPush
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Thu, 9 May 2024 17:37:51 +0000 (17:37 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Tue, 24 Mar 2026 16:06:24 +0000 (16:06 +0000)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/ec_recovery_backend.h
src/crimson/osd/pg.cc
src/crimson/osd/pg.h

index 9ca33111b2999187e5cdcc20e5bfb5e6c05b7a55..66fdd67deaf1e1c465676006c5773ac6d0e753eb 100644 (file)
@@ -49,6 +49,9 @@ public:
     return seastar::now();
   }
 
+  interruptible_future<> handle_push(
+    Ref<MOSDPGPush> m);
+
 private:
   void commit_txn_send_replies(
     ceph::os::Transaction&& txn,
@@ -58,8 +61,6 @@ private:
     const std::map<std::string, ceph::bufferlist, std::less<>>& raw_attrs,
     RecoveryOp &op) final;
 
-  interruptible_future<> handle_push(
-    Ref<MOSDPGPush> m);
   interruptible_future<> handle_push_reply(
     Ref<MOSDPGPushReply> m);
 };
index e1e7100ed44f2a04be54b947e879e03cec41197c..4343c3812286fdb17f142e0a705c79aa41a7f3bf 100644 (file)
@@ -1930,4 +1930,18 @@ bool PG::check_in_progress_op(
       reqid, version, user_version, return_code, op_returns));
 }
 
+void PG::send_message_osd_cluster(int osd, MOSDPGPush* msg, epoch_t from_epoch)
+{
+  logger().debug("{}: MOSDPGPush from_epoch {} to osd.{}",
+                 __func__, from_epoch, osd);
+  if (whoami_shard().osd == osd) {
+    static_cast<ECRecoveryBackend&>(*recovery_backend).handle_push(msg);
+  } else {
+    std::vector wrapped_msg {
+      std::make_pair(osd, static_cast<Message*>(msg))
+    };
+    send_message_osd_cluster(wrapped_msg, from_epoch);
+  }
+}
+
 }
index daf0e35950959f94ba407557b6e763ef58843606..c5a92ed3306f9def25131d4cb72ccac00c9808b7 100644 (file)
@@ -159,6 +159,8 @@ public:
       });
     });
   }
+  void send_message_osd_cluster(
+    int osd, MOSDPGPush* msg, epoch_t from_epoch) override;
   std::ostream& gen_dbg_prefix(std::ostream& out) const override final {
     return gen_prefix(out);
   }