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() *
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:
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,
ceph::ErasureCodeInterfaceRef ec_impl;
const ECUtil::stripe_info_t& sinfo;
- PGBackend::Listener* parent;
+ ECListener* parent;
// TODO: lay an interface down here
ECBackend& ec_backend;
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)),