From 16490fd725a82662348710ed53a017e5fcfc8d0a Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 4 Apr 2023 23:13:41 +0000 Subject: [PATCH] osd/scheduler: remove OpQueueable::get_order_locker() and supporting machinery Apparently unused. Signed-off-by: Samuel Just --- src/osd/scheduler/OpSchedulerItem.h | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/src/osd/scheduler/OpSchedulerItem.h b/src/osd/scheduler/OpSchedulerItem.h index e2686ddbf2976..5f14a45937818 100644 --- a/src/osd/scheduler/OpSchedulerItem.h +++ b/src/osd/scheduler/OpSchedulerItem.h @@ -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; - 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 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 { -- 2.39.5