#include "crimson/osd/pg_backend.h"
#include "crimson/osd/exceptions.h"
+#include "messages/MOSDOp.h"
+
class PGLSFilter;
class OSDOp;
PGBackend::cached_os_t os;
PG& pg;
PGBackend& backend;
+ Ref<MOSDOp> msg;
ceph::os::Transaction txn;
size_t num_read = 0; ///< count read ops
}
public:
- OpsExecuter(PGBackend::cached_os_t os, PG& pg)
- : os(std::move(os)), pg(pg), backend(pg.get_backend()) {
+ OpsExecuter(PGBackend::cached_os_t os, PG& pg, Ref<MOSDOp> msg)
+ : os(std::move(os)),
+ pg(pg),
+ backend(pg.get_backend()),
+ msg(std::move(msg)) {
}
seastar::future<> do_osd_op(class OSDOp& osd_op);
template <typename Func>
seastar::future<> submit_changes(Func&& f) &&;
+
+ auto get_orig_source_inst() const {
+ return msg->get_orig_source_inst();
+ }
};
template <class Context, class MainFunc, class EffectFunc>
const auto oid = m->get_snapid() == CEPH_SNAPDIR ? m->get_hobj().get_head()
: m->get_hobj();
return backend->get_object_state(oid).then([this, m](auto os) mutable {
- return seastar::do_with(OpsExecuter{std::move(os), *this/* as const& */},
- [this, m=std::move(m)] (auto& ox) {
+ return seastar::do_with(OpsExecuter{std::move(os), *this/* as const& */, m},
+ [this, m] (auto& ox) {
return seastar::do_for_each(m->ops, [this, &ox](OSDOp& osd_op) {
logger().debug("will be handling op {}", ceph_osd_op_name(osd_op.op.op));
return ox.do_osd_op(osd_op);