From: Kefu Chai Date: Wed, 11 Nov 2020 11:18:54 +0000 (+0800) Subject: crimson/osd: drop PG::get_or_load_head_obc() X-Git-Tag: v16.1.0~567^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ce8c0f363d24ce958bbf880ee60843f7ae78eaa2;p=ceph.git crimson/osd: drop PG::get_or_load_head_obc() as it is not used anymore. Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index e40ae947bb85..a745580b1d46 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -838,41 +838,6 @@ PG::with_head_obc(hobject_t, with_obc_func_t&&); template seastar::future<> PG::with_head_obc(hobject_t, with_obc_func_t&&); -PG::load_obc_ertr::future< - std::pair> -PG::get_or_load_head_obc(hobject_t oid) -{ - if (__builtin_expect(stopping, false)) { - throw crimson::common::system_shutdown_exception(); - } - - ceph_assert(oid.is_head()); - auto [obc, existed] = shard_services.obc_registry.get_cached_obc(oid); - if (existed) { - logger().debug( - "{}: found {} in cache", - __func__, - oid); - return load_obc_ertr::make_ready_future< - std::pair>( - std::make_pair(std::move(obc), true) - ); - } else { - logger().debug( - "{}: cache miss on {}", - __func__, - oid); - bool got = obc->maybe_get_excl(); - ceph_assert(got); - return load_head_obc(obc).safe_then([](auto obc) { - return load_obc_ertr::make_ready_future< - std::pair>( - std::make_pair(std::move(obc), false) - ); - }); - } -} - PG::load_obc_ertr::future PG::load_head_obc(ObjectContextRef obc) { diff --git a/src/crimson/osd/pg.h b/src/crimson/osd/pg.h index d51d806ffea8..993e4cc9dcc9 100644 --- a/src/crimson/osd/pg.h +++ b/src/crimson/osd/pg.h @@ -501,10 +501,6 @@ public: get_or_load_clone_obc( hobject_t oid, crimson::osd::ObjectContextRef head_obc); - load_obc_ertr::future< - std::pair> - get_or_load_head_obc(hobject_t oid); - load_obc_ertr::future load_head_obc(ObjectContextRef obc);