From e054d79fe98a5c0b6b0792d1ab7670a95b536fd9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rados=C5=82aw=20Zarzy=C5=84ski?= Date: Fri, 1 Apr 2022 20:05:11 +0200 Subject: [PATCH] crimson/osd: OperationThrottler derives from BlockerT instead of Blocker. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit One another step closer. See the previous' commit description. Signed-off-by: Radosław Zarzyński --- src/crimson/osd/osd_operation.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/crimson/osd/osd_operation.h b/src/crimson/osd/osd_operation.h index 3416a0e733c45..45694acf4896f 100644 --- a/src/crimson/osd/osd_operation.h +++ b/src/crimson/osd/osd_operation.h @@ -113,8 +113,11 @@ using OSDOperationRegistry = OperationRegistryT< * expensive and simply limits the number that can be * concurrently active. */ -class OperationThrottler : public Blocker, +class OperationThrottler : public BlockerT, private md_config_obs_t { + friend BlockerT; + static constexpr const char* type_name = "OperationThrottler"; + template auto with_throttle( OperationT* op, @@ -153,11 +156,7 @@ public: private: void dump_detail(Formatter *f) const final; - const char *get_type_name() const final { - return "OperationThrottler"; - } -private: crimson::osd::scheduler::SchedulerRef scheduler; uint64_t max_in_progress = 0; -- 2.39.5