]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/scheduler: remove OpQueueable::get_order_locker() and supporting machinery
authorSamuel Just <sjust@redhat.com>
Tue, 4 Apr 2023 23:13:41 +0000 (23:13 +0000)
committerSridhar Seshasayee <sseshasa@redhat.com>
Mon, 8 May 2023 09:16:25 +0000 (14:46 +0530)
Apparently unused.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/osd/scheduler/OpSchedulerItem.h

index e2686ddbf2976fa3605b53134ce063004db1a166..5f14a459378183f4a22739194bb250f9997d5cef 100644 (file)
@@ -40,14 +40,6 @@ std::ostream& operator<<(std::ostream& out, const op_scheduler_class& class_id);
 
 class OpSchedulerItem {
 public:
-  class OrderLocker {
-  public:
-    using Ref = std::unique_ptr<OrderLocker>;
-    virtual void lock() = 0;
-    virtual void unlock() = 0;
-    virtual ~OrderLocker() {}
-  };
-
   // Abstraction for operations queueable in the op queue
   class OpQueueable {
   public:
@@ -59,7 +51,7 @@ public:
     /* Items will be dequeued and locked atomically w.r.t. other items with the
        * same ordering token */
     virtual const spg_t& get_ordering_token() const = 0;
-    virtual OrderLocker::Ref get_order_locker(PGRef pg) = 0;
+
     virtual std::optional<OpRequestRef> maybe_get_op() const {
       return std::nullopt;
     }
@@ -120,9 +112,6 @@ public:
   OpSchedulerItem &operator=(OpSchedulerItem &&) = default;
   OpSchedulerItem &operator=(const OpSchedulerItem &) = delete;
 
-  OrderLocker::Ref get_order_locker(PGRef pg) {
-    return qitem->get_order_locker(pg);
-  }
   uint32_t get_queue_token() const {
     return qitem->get_queue_token();
   }
@@ -219,22 +208,6 @@ public:
   const spg_t& get_ordering_token() const final {
     return get_pgid();
   }
-
-  OpSchedulerItem::OrderLocker::Ref get_order_locker(PGRef pg) final {
-    class Locker : public OpSchedulerItem::OrderLocker {
-      PGRef pg;
-    public:
-      explicit Locker(PGRef pg) : pg(pg) {}
-      void lock() final {
-       pg->lock();
-      }
-      void unlock() final {
-       pg->unlock();
-      }
-    };
-    return OpSchedulerItem::OrderLocker::Ref(
-      new Locker(pg));
-  }
 };
 
 class PGOpItem : public PGOpQueueable {