]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: drop PG::get_or_load_head_obc()
authorKefu Chai <kchai@redhat.com>
Wed, 11 Nov 2020 11:18:54 +0000 (19:18 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 18 Nov 2020 09:37:59 +0000 (17:37 +0800)
as it is not used anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/pg.cc
src/crimson/osd/pg.h

index e40ae947bb85a71d93c839903fdba57e9adeba7e..a745580b1d46d8f186de5360b592498507b3cff1 100644 (file)
@@ -838,41 +838,6 @@ PG::with_head_obc<RWState::RWREAD>(hobject_t, with_obc_func_t&&);
 template seastar::future<>
 PG::with_head_obc<RWState::RWNONE>(hobject_t, with_obc_func_t&&);
 
-PG::load_obc_ertr::future<
-  std::pair<crimson::osd::ObjectContextRef, bool>>
-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<crimson::osd::ObjectContextRef, bool>>(
-       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<crimson::osd::ObjectContextRef, bool>>(
-          std::make_pair(std::move(obc), false)
-        );
-    });
-  }
-}
-
 PG::load_obc_ertr::future<crimson::osd::ObjectContextRef>
 PG::load_head_obc(ObjectContextRef obc)
 {
index d51d806ffea8ead30301242c7d942691eb0a39a0..993e4cc9dcc956d79e19e28a5ac4c94fa4fc2c7e 100644 (file)
@@ -501,10 +501,6 @@ public:
   get_or_load_clone_obc(
     hobject_t oid, crimson::osd::ObjectContextRef head_obc);
 
-  load_obc_ertr::future<
-    std::pair<crimson::osd::ObjectContextRef, bool>>
-  get_or_load_head_obc(hobject_t oid);
-
   load_obc_ertr::future<crimson::osd::ObjectContextRef>
   load_head_obc(ObjectContextRef obc);