Skip to content

Commit 0f7add9

Browse files
committed
crimson/osd/osd_operation: remove unused with_throttle[_while] variants
Signed-off-by: Samuel Just <[email protected]>
1 parent 88432eb commit 0f7add9

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

src/crimson/osd/osd_operation.h

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -298,34 +298,6 @@ class OperationThrottler : public BlockerT<OperationThrottler>,
298298
friend BlockerT<OperationThrottler>;
299299
static constexpr const char* type_name = "OperationThrottler";
300300

301-
template <typename OperationT, typename F>
302-
auto with_throttle(
303-
OperationT* op,
304-
crimson::osd::scheduler::params_t params,
305-
F &&f) {
306-
if (!max_in_progress) return f();
307-
return acquire_throttle(params)
308-
.then(std::forward<F>(f))
309-
.then([this](auto x) {
310-
release_throttle();
311-
return x;
312-
});
313-
}
314-
315-
template <typename OperationT, typename F>
316-
seastar::future<> with_throttle_while(
317-
OperationT* op,
318-
crimson::osd::scheduler::params_t params,
319-
F &&f) {
320-
return with_throttle(op, params, f).then([this, params, op, f](bool cont) {
321-
return cont
322-
? seastar::yield().then([params, op, f, this] {
323-
return with_throttle_while(op, params, f); })
324-
: seastar::now();
325-
});
326-
}
327-
328-
329301
public:
330302
OperationThrottler(ConfigProxy &conf);
331303

@@ -350,14 +322,6 @@ class OperationThrottler : public BlockerT<OperationThrottler>,
350322
});
351323
}
352324

353-
template <class OpT, class... Args>
354-
seastar::future<> with_throttle_while(
355-
BlockingEvent::Trigger<OpT>&& trigger,
356-
Args&&... args) {
357-
return trigger.maybe_record_blocking(
358-
with_throttle_while(std::forward<Args>(args)...), *this);
359-
}
360-
361325
private:
362326
void dump_detail(Formatter *f) const final;
363327

0 commit comments

Comments
 (0)