]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: ObjectContext is not a Blocker anymore. 38572/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 14 Dec 2020 17:10:10 +0000 (18:10 +0100)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 14 Dec 2020 18:33:35 +0000 (19:33 +0100)
This is a follow-up to the c2dc437f78cd8be393c4d2eb8d79ce9c351ec4de
which removes unused OBC mebers after the with_lock() transition.

I'm not sure there is a reason to keep the `Blocker` bits as all
`ObjectContext::dump_detail()` does is just dumping `object_state_t`
while entering the OBC stage is already denoted by `PGPipeline::get_obc`.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/object_context.cc
src/crimson/osd/object_context.h

index 6f20b62a1c4c48fc844c37ac3147738ca7ab0278..bbc71d3f9a439b412a16a73fce89b84d1aec6682 100644 (file)
@@ -8,13 +8,6 @@
 
 namespace crimson::osd {
 
-void ObjectContext::dump_detail(Formatter *f) const
-{
-  f->open_object_section("ObjectContext");
-  obs.oi.dump(f);
-  f->close_section();
-}
-
 ObjectContextRegistry::ObjectContextRegistry(crimson::common::ConfigProxy &conf)
 {
   obc_lru.set_target_size(conf.get_val<uint64_t>("crimson_osd_obc_lru_size"));
index f108d2cb717c72c8db9d536ccc8dd50f0bc5e413..2527dd98262c2427c5840664756e272a041c312a 100644 (file)
@@ -35,8 +35,7 @@ struct obc_to_hoid {
   }
 };
 
-class ObjectContext : public Blocker,
-                     public ceph::common::intrusive_lru_base<
+class ObjectContext : public ceph::common::intrusive_lru_base<
   ceph::common::intrusive_lru_config<
     hobject_t, ObjectContext, obc_to_hoid<ObjectContext>>>
 {
@@ -98,19 +97,6 @@ private:
   tri_mutex lock;
   bool recovery_read_marker = false;
 
-  const char *get_type_name() const final {
-    return "ObjectContext";
-  }
-  void dump_detail(Formatter *f) const final;
-
-  template <typename LockF>
-  seastar::future<> get_lock(
-    Operation *op,
-    LockF &&lockf) {
-    return op->with_blocking_future(
-      make_blocking_future(std::forward<LockF>(lockf)));
-  }
-
   template <typename Lock, typename Func>
   auto _with_lock(Lock&& lock, Func&& func) {
     Ref obc = this;
@@ -160,13 +146,6 @@ public:
     return lock.is_acquired();
   }
 
-  template <typename F>
-  seastar::future<> get_write_greedy(Operation *op) {
-    return get_lock(op, [this] {
-      return lock.lock_for_write(true);
-    });
-  }
-
   bool get_recovery_read() {
     if (lock.try_lock_for_read()) {
       recovery_read_marker = true;