From cd9dcf6582ca23ac25abba1813b2bebe79b29142 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Tue, 15 Apr 2025 15:56:09 -0700 Subject: [PATCH] crimson: remove unused OperationThrottler::with_throttle It's now unused, and these combinator style wrappers are easy to misuse and hard to read compared with RAII and coroutines. Signed-off-by: Samuel Just --- src/crimson/osd/osd_operation.h | 11 ----------- src/crimson/osd/shard_services.h | 1 - 2 files changed, 12 deletions(-) diff --git a/src/crimson/osd/osd_operation.h b/src/crimson/osd/osd_operation.h index cee9bf2974f69..167ceac463f3a 100644 --- a/src/crimson/osd/osd_operation.h +++ b/src/crimson/osd/osd_operation.h @@ -334,17 +334,6 @@ public: }); } - template - auto with_throttle( - crimson::osd::scheduler::params_t params, - F &&f) { - return acquire_throttle(params) - .then(std::forward(f)) - .finally([this] { - release_throttle(); - }); - } - private: void dump_detail(Formatter *f) const final; diff --git a/src/crimson/osd/shard_services.h b/src/crimson/osd/shard_services.h index df9ecc1c35fc3..61880909bcddd 100644 --- a/src/crimson/osd/shard_services.h +++ b/src/crimson/osd/shard_services.h @@ -593,7 +593,6 @@ public: } FORWARD_TO_OSD_SINGLETON(get_pool_info) - FORWARD(with_throttle, with_throttle, local_state.throttler) FORWARD(get_throttle, get_throttle, local_state.throttler) FORWARD_TO_OSD_SINGLETON(build_incremental_map_msg) -- 2.47.3