]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: lay down the ECListener for ECBackend::RMWPipeline
authorRadosław Zarzyński <rzarzyns@redhat.com>
Fri, 15 Sep 2023 13:15:01 +0000 (15:15 +0200)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 10 Jan 2024 17:23:14 +0000 (17:23 +0000)
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
src/osd/ECBackend.cc
src/osd/ECBackend.h

index e597129626f5c0dff782f00d47ef247fa298dc8d..ec8fdc0637a292f480c568381f2727d8ffd67db2 100644 (file)
@@ -225,7 +225,7 @@ ECBackend::ECBackend(
   uint64_t stripe_width)
   : PGBackend(cct, pg, store, coll, ch),
     read_pipeline(cct, ec_impl, this->sinfo, get_parent()->get_eclistener()),
-    rmw_pipeline(cct, ec_impl, this->sinfo, get_parent(), *this),
+    rmw_pipeline(cct, ec_impl, this->sinfo, get_parent()->get_eclistener(), *this),
     ec_impl(ec_impl),
     sinfo(ec_impl->get_data_chunk_count(), stripe_width) {
   ceph_assert((ec_impl->get_data_chunk_count() *
index 238895d3e5b346615e847f8ba39ecb477f885835..2a351113f3fffcab26fea963f65f343212491b92 100644 (file)
@@ -79,6 +79,20 @@ struct RecoveryMessages;
       std::vector<std::pair<int, Message*>>& messages, epoch_t from_epoch) = 0;
 
     virtual std::ostream& gen_dbg_prefix(std::ostream& out) const = 0;
+
+    // RMWPipeline
+    virtual const pg_pool_t &get_pool() const = 0;
+    virtual const std::set<pg_shard_t> &get_acting_recovery_backfill_shards() const = 0;
+    virtual bool should_send_op(
+      pg_shard_t peer,
+      const hobject_t &hoid) = 0;
+    virtual const std::map<pg_shard_t, pg_info_t> &get_shard_info() const = 0;
+    virtual spg_t primary_spg_t() const = 0;
+    virtual const PGLog &get_log() const = 0;
+    virtual DoutPrefixProvider *get_dpp() = 0;
+    virtual void apply_stats(
+       const hobject_t &soid,
+       const object_stat_sum_t &delta_stats) = 0;
   };
 class ECBackend : public PGBackend {
 public:
@@ -678,12 +692,11 @@ public:
     void call_write_ordered(std::function<void(void)> &&cb);
 
     CephContext* cct;
-    PGBackend::Listener *get_parent() const { return parent; }
+    ECListener *get_parent() const { return parent; }
     const OSDMapRef& get_osdmap() const { return get_parent()->pgb_get_osdmap(); }
     epoch_t get_osdmap_epoch() const { return get_parent()->pgb_get_osdmap_epoch(); }
     const pg_info_t &get_info() { return get_parent()->get_info(); }
 
-    // TODO: this will is going to be the RMWPipeline::Listener
     template <typename Func>
     void objects_read_async_no_cache(
       const std::map<hobject_t,extent_set> &to_read,
@@ -715,7 +728,7 @@ public:
 
     ceph::ErasureCodeInterfaceRef ec_impl;
     const ECUtil::stripe_info_t& sinfo;
-    PGBackend::Listener* parent;
+    ECListener* parent;
 
     // TODO: lay an interface down here
     ECBackend& ec_backend;
@@ -723,7 +736,7 @@ public:
     RMWPipeline(CephContext* cct,
                 ceph::ErasureCodeInterfaceRef ec_impl,
                 const ECUtil::stripe_info_t& sinfo,
-                PGBackend::Listener* parent,
+                ECListener* parent,
                 ECBackend& ec_backend)
       : cct(cct),
         ec_impl(std::move(ec_impl)),