From: Radosław Zarzyński Date: Fri, 1 Apr 2022 18:03:15 +0000 (+0200) Subject: crimson/osd: make OperationThrottler aware about exact type of operation X-Git-Tag: v18.0.0~947^2~51 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c35c49908c7145f74b5cda05d3b2f461599982a8;p=ceph-ci.git crimson/osd: make OperationThrottler aware about exact type of operation This is a step towards making op's blocker registry static and compile-time checked. Signed-off-by: Radosław Zarzyński --- diff --git a/src/crimson/osd/osd_operation.h b/src/crimson/osd/osd_operation.h index 8bde25e0efd..3416a0e733c 100644 --- a/src/crimson/osd/osd_operation.h +++ b/src/crimson/osd/osd_operation.h @@ -115,9 +115,9 @@ using OSDOperationRegistry = OperationRegistryT< */ class OperationThrottler : public Blocker, private md_config_obs_t { - template + template auto with_throttle( - OperationRef op, + OperationT* op, crimson::osd::scheduler::params_t params, F &&f) { if (!max_in_progress) return f(); @@ -138,9 +138,9 @@ public: const std::set &changed) final; void update_from_config(const ConfigProxy &conf); - template + template seastar::future<> with_throttle_while( - OperationRef op, + OperationT* op, crimson::osd::scheduler::params_t params, F &&f) { return with_throttle(op, params, f).then([this, params, op, f](bool cont) {