]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: remove unused PG::with_locked_obc
authorSamuel Just <sjust@redhat.com>
Thu, 3 Oct 2024 19:37:08 +0000 (12:37 -0700)
committerSamuel Just <sjust@redhat.com>
Thu, 7 Nov 2024 18:29:42 +0000 (10:29 -0800)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/pg.cc
src/crimson/osd/pg.h

index 5822c4f9a4f5803cc9c55c3fdc0b9f3073580bca..de39fb45716619a339bb6537e00e0de769288a66 100644 (file)
@@ -1226,31 +1226,6 @@ void PG::check_blocklisted_obc_watchers(
   }
 }
 
-PG::load_obc_iertr::future<>
-PG::with_locked_obc(const hobject_t &hobj,
-                    const OpInfo &op_info,
-                    with_obc_func_t &&f)
-{
-  if (__builtin_expect(stopping, false)) {
-    throw crimson::common::system_shutdown_exception();
-  }
-  const hobject_t oid = get_oid(hobj);
-  auto wrapper = [f=std::move(f), this](auto head, auto obc) {
-    check_blocklisted_obc_watchers(obc);
-    return f(head, obc);
-  };
-  switch (get_lock_type(op_info)) {
-  case RWState::RWREAD:
-      return obc_loader.with_obc<RWState::RWREAD>(oid, std::move(wrapper));
-  case RWState::RWWRITE:
-      return obc_loader.with_obc<RWState::RWWRITE>(oid, std::move(wrapper));
-  case RWState::RWEXCL:
-      return obc_loader.with_obc<RWState::RWEXCL>(oid, std::move(wrapper));
-  default:
-    ceph_abort();
-  };
-}
-
 void PG::update_stats(const pg_stat_t &stat) {
   peering_state.update_stats(
     [&stat] (auto& history, auto& stats) {
index f7c2d417e4fac9293d8d724db6506b6409dc8f47..0efb942126a69a675284f826b5288fbb10eee868 100644 (file)
@@ -590,11 +590,6 @@ public:
   using with_obc_func_t =
     std::function<load_obc_iertr::future<> (ObjectContextRef, ObjectContextRef)>;
 
-  load_obc_iertr::future<> with_locked_obc(
-    const hobject_t &hobj,
-    const OpInfo &op_info,
-    with_obc_func_t&& f);
-
   interruptible_future<> handle_rep_op(Ref<MOSDRepOp> m);
   void update_stats(const pg_stat_t &stat);
   interruptible_future<> update_snap_map(