]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: OperationThrottler derives from BlockerT instead of Blocker.
authorRadosław Zarzyński <rzarzyns@redhat.com>
Fri, 1 Apr 2022 18:05:11 +0000 (20:05 +0200)
committerRadosław Zarzyński <rzarzyns@redhat.com>
Thu, 5 May 2022 02:06:31 +0000 (04:06 +0200)
One another step closer. See the previous' commit description.

Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
src/crimson/osd/osd_operation.h

index 3416a0e733c458ba8e9f1966aadd231f89fc4546..45694acf4896f5d03e0993cd5b4fd81895defc77 100644 (file)
@@ -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<OperationThrottler>,
                        private md_config_obs_t {
+  friend BlockerT<OperationThrottler>;
+  static constexpr const char* type_name = "OperationThrottler";
+
   template <typename OperationT, typename F>
   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;