template <typename I>
Throttler<I>::Throttler(CephContext *cct, const std::string &config_key)
: m_cct(cct), m_config_key(config_key),
- m_config_keys{m_config_key.c_str(), nullptr},
m_lock(ceph::make_mutex(
librbd::util::unique_lock_name("rbd::mirror::Throttler", this))),
m_max_concurrent_ops(cct->_conf.get_val<uint64_t>(m_config_key)) {
f->dump_int("waiting_requests", m_queue.size());
}
-template <typename I>
-const char** Throttler<I>::get_tracked_conf_keys() const {
- return m_config_keys;
-}
-
template <typename I>
void Throttler<I>::handle_conf_change(const ConfigProxy& conf,
const std::set<std::string> &changed) {
CephContext *m_cct;
const std::string m_config_key;
- mutable const char* m_config_keys[2];
ceph::mutex m_lock;
uint32_t m_max_concurrent_ops;
std::map<Id, Context *> m_queued_ops;
std::set<Id> m_inflight_ops;
- const char **get_tracked_conf_keys() const override;
+ std::vector<std::string> get_tracked_keys() const noexcept override {
+ return std::vector<std::string>{m_config_key};
+ }
void handle_conf_change(const ConfigProxy& conf,
const std::set<std::string> &changed) override;
};