From: Radosław Zarzyński Date: Tue, 19 Sep 2023 13:11:12 +0000 (+0200) Subject: osd: decouple RMWPipeline from ECBackend X-Git-Tag: v19.3.0~13^2~27 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4d6970e7006ed21143d9e0e0e8d02174b46baeda;p=ceph.git osd: decouple RMWPipeline from ECBackend Signed-off-by: Radosław Zarzyński --- diff --git a/src/osd/ECBackend.h b/src/osd/ECBackend.h index ae169fd8ff34..a2769e6cb6dc 100644 --- a/src/osd/ECBackend.h +++ b/src/osd/ECBackend.h @@ -97,6 +97,21 @@ struct RecoveryMessages; }; struct ECCommon { + virtual ~ECCommon() = default; + + virtual void handle_sub_write( + pg_shard_t from, + OpRequestRef msg, + ECSubWrite &op, + const ZTracer::Trace &trace + ) = 0; + + virtual void objects_read_and_reconstruct( + const std::map > + > &reads, + bool fast_read, + GenContextURef > &&> &&func) = 0; + struct read_request_t { const std::list > to_read; std::map>> need; @@ -363,7 +378,7 @@ public: OpRequestRef msg, ECSubWrite &op, const ZTracer::Trace &trace - ); + ) override; void handle_sub_read( pg_shard_t from, const ECSubRead &op, @@ -437,7 +452,7 @@ public: const std::map > > &reads, bool fast_read, - GenContextURef > &&> &&func); + GenContextURef > &&> &&func) override; void objects_read_async( const hobject_t &hoid, @@ -738,15 +753,13 @@ public: ceph::ErasureCodeInterfaceRef ec_impl; const ECUtil::stripe_info_t& sinfo; ECListener* parent; - - // TODO: lay an interface down here - ECBackend& ec_backend; + ECCommon& ec_backend; RMWPipeline(CephContext* cct, ceph::ErasureCodeInterfaceRef ec_impl, const ECUtil::stripe_info_t& sinfo, ECListener* parent, - ECBackend& ec_backend) + ECCommon& ec_backend) : cct(cct), ec_impl(std::move(ec_impl)), sinfo(sinfo),