From 9f27a8327415c4c7245f349a5e6c46aa164a1508 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Fri, 20 Nov 2020 13:42:32 +0100 Subject: [PATCH] crimson: comment on why OpsExecuter needs PG. Signed-off-by: Radoslaw Zarzynski --- src/crimson/osd/pg.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 5c78a5d115b..38c913c4d23 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -608,8 +608,10 @@ seastar::future> PG::do_osd_ops( using osd_op_errorator = OpsExecuter::osd_op_errorator; const auto oid = m->get_snapid() == CEPH_SNAPDIR ? m->get_hobj().get_head() : m->get_hobj(); + // OpsExecuter gets PG as non-const as it's responsible for modying + // e.g. `projected_last_update`. auto ox = - std::make_unique(obc, op_info, *this/* as const& */, m); + std::make_unique(obc, op_info, *this, m); return crimson::do_for_each( m->ops, [obc, m, ox = ox.get()](OSDOp& osd_op) { -- 2.39.5