From a8e05fc5a60213cd2552bb7bba53ac0ffce09b44 Mon Sep 17 00:00:00 2001 From: Radoslaw Zarzynski Date: Mon, 15 Mar 2021 19:24:27 +0000 Subject: [PATCH] crimson/osd: use obc->get_oid() instead of passing hobject_t around. Signed-off-by: Radoslaw Zarzynski --- src/crimson/osd/pg.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 0e3200d4ff4..224ae283e2c 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -861,16 +861,16 @@ PG::with_head_obc(hobject_t oid, with_obc_func_t&& func) logger().debug("{} {}", __func__, oid); boost::intrusive_ptr pgref{this}; assert(oid.is_head()); - auto [obc, existed] = shard_services.obc_registry.get_cached_obc(oid); + auto [obc, existed] = + shard_services.obc_registry.get_cached_obc(std::move(oid)); obc->append_to(obc_set_accessing); return obc->with_lock( - [oid=std::move(oid), existed=existed, obc=obc, - func=std::move(func), this] { + [existed=existed, obc=obc, func=std::move(func), this] { auto loaded = load_obc_iertr::make_ready_future(obc); if (existed) { - logger().debug("with_head_obc: found {} in cache", oid); + logger().debug("with_head_obc: found {} in cache", obc->get_oid()); } else { - logger().debug("with_head_obc: cache miss on {}", oid); + logger().debug("with_head_obc: cache miss on {}", obc->get_oid()); loaded = obc->with_promoted_lock([this, obc] { return load_head_obc(obc); }); -- 2.39.5