mirror of
https://github.com/ceph/ceph
synced 2025-02-21 18:17:42 +00:00
crimson/osd: avoid unneeded obc catching in PG::do_osd_ops_execute().
Actually, `OpsExecuter` already holds `ObjectContextRef` and even has a (private till now) getter for `hobject_t` extraction. Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This commit is contained in:
parent
3903a71a60
commit
8b90df0dd2
@ -166,10 +166,6 @@ private:
|
||||
class OSDOp& osd_op,
|
||||
const class ObjectState& os);
|
||||
|
||||
const hobject_t &get_target() const {
|
||||
return obc->obs.oi.soid;
|
||||
}
|
||||
|
||||
template <class Func>
|
||||
auto do_const_op(Func&& f) {
|
||||
// TODO: pass backend as read-only
|
||||
@ -216,6 +212,10 @@ public:
|
||||
template <typename MutFunc>
|
||||
osd_op_ierrorator::future<> flush_changes(MutFunc&& mut_func) &&;
|
||||
|
||||
const hobject_t &get_target() const {
|
||||
return obc->obs.oi.soid;
|
||||
}
|
||||
|
||||
const auto& get_message() const {
|
||||
return msg;
|
||||
}
|
||||
|
@ -715,18 +715,18 @@ PG::do_osd_ops(
|
||||
auto ox = std::make_unique<OpsExecuter>(
|
||||
obc, op_info, get_pool().info, get_backend(), *m);
|
||||
return interruptor::do_for_each(
|
||||
m->ops.begin(), m->ops.end(), [obc, m, ox = ox.get()](OSDOp& osd_op) {
|
||||
m->ops.begin(), m->ops.end(), [m, ox = ox.get()](OSDOp& osd_op) {
|
||||
logger().debug(
|
||||
"do_osd_ops: {} - object {} - handling op {}",
|
||||
*m,
|
||||
obc->obs.oi.soid,
|
||||
ox->get_target(),
|
||||
ceph_osd_op_name(osd_op.op.op));
|
||||
return ox->execute_op(osd_op);
|
||||
}).safe_then_interruptible([this, obc, m, ox = ox.get(), &op_info] {
|
||||
}).safe_then_interruptible([this, m, ox = ox.get(), &op_info] {
|
||||
logger().debug(
|
||||
"do_osd_ops: {} - object {} all operations successful",
|
||||
*m,
|
||||
obc->obs.oi.soid);
|
||||
ox->get_target());
|
||||
return std::move(*ox).flush_changes(
|
||||
[this, m, &op_info] (auto&& txn,
|
||||
auto&& obc,
|
||||
@ -735,7 +735,7 @@ PG::do_osd_ops(
|
||||
logger().debug(
|
||||
"do_osd_ops: {} - object {} submitting txn",
|
||||
*m,
|
||||
obc->obs.oi.soid);
|
||||
obc->get_oid());
|
||||
fill_op_params_bump_pg_version(osd_op_p, std::move(m), user_modify);
|
||||
return submit_transaction(
|
||||
op_info,
|
||||
|
Loading…
Reference in New Issue
Block a user