]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd/object_context: drop unused methods 38022/head
authorKefu Chai <kchai@redhat.com>
Wed, 11 Nov 2020 13:25:55 +0000 (21:25 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 18 Nov 2020 09:37:59 +0000 (17:37 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/object_context.h

index d2ee138ac4eaf1ee46fc34d3a180aeb968a323cb..7e14ac3e16f0c7a9df63dada819b10120589ec0c 100644 (file)
@@ -140,59 +140,6 @@ public:
       assert(0 == "noop");
     }
   }
-  seastar::future<> get_lock_type(Operation *op, RWState::State type) {
-    switch (type) {
-    case RWState::RWWRITE:
-      return get_lock(op, lock.lock_for_write(false));
-    case RWState::RWREAD:
-      return get_lock(op, lock.lock_for_read());
-    case RWState::RWEXCL:
-      return get_lock(op, lock.lock_for_excl());
-    case RWState::RWNONE:
-      return seastar::make_ready_future<>();
-    default:
-      assert(0 == "invalid lock type");
-    }
-  }
-
-  void put_lock_type(RWState::State type) {
-    switch (type) {
-    case RWState::RWWRITE:
-      return lock.unlock_for_write();
-    case RWState::RWREAD:
-      return lock.unlock_for_read();
-    case RWState::RWEXCL:
-      return lock.unlock_for_excl();
-    case RWState::RWNONE:
-      return;
-    default:
-      assert(0 == "invalid lock type");
-    }
-  }
-
-  void degrade_excl_to(RWState::State type) {
-    // assume we already hold an excl lock
-    lock.unlock_for_excl();
-    bool success = false;
-    switch (type) {
-    case RWState::RWWRITE:
-      success = lock.try_lock_for_write(false);
-      break;
-    case RWState::RWREAD:
-      success = lock.try_lock_for_read();
-      break;
-    case RWState::RWEXCL:
-      success = lock.try_lock_for_excl();
-      break;
-    case RWState::RWNONE:
-      success = true;
-      break;
-    default:
-      assert(0 == "invalid lock type");
-      break;
-    }
-    ceph_assert(success);
-  }
 
   bool empty() const {
     return !lock.is_acquired();