From: Ronen Friedman Date: Sun, 9 Mar 2025 16:57:40 +0000 (-0500) Subject: rbd/throttler: replace obsolete get_tracked_conf_keys() X-Git-Tag: v20.3.0~383^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=329043355e6fe0a1440aeeac841b37fb1c958ba7;p=ceph.git rbd/throttler: replace obsolete get_tracked_conf_keys() .. with get_tracked_keys(). Following https://github.com/ceph/ceph/pull/61394, all uses of the deprecated interface will be updated, and that old interface will be removed. Signed-off-by: Ronen Friedman --- diff --git a/src/tools/rbd_mirror/Throttler.cc b/src/tools/rbd_mirror/Throttler.cc index 07d6e397ec6..690f95c9f01 100644 --- a/src/tools/rbd_mirror/Throttler.cc +++ b/src/tools/rbd_mirror/Throttler.cc @@ -30,7 +30,6 @@ namespace mirror { template Throttler::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(m_config_key)) { @@ -221,11 +220,6 @@ void Throttler::print_status(ceph::Formatter *f) { f->dump_int("waiting_requests", m_queue.size()); } -template -const char** Throttler::get_tracked_conf_keys() const { - return m_config_keys; -} - template void Throttler::handle_conf_change(const ConfigProxy& conf, const std::set &changed) { diff --git a/src/tools/rbd_mirror/Throttler.h b/src/tools/rbd_mirror/Throttler.h index 32080238aea..85cc2aab780 100644 --- a/src/tools/rbd_mirror/Throttler.h +++ b/src/tools/rbd_mirror/Throttler.h @@ -53,7 +53,6 @@ private: 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; @@ -61,7 +60,9 @@ private: std::map m_queued_ops; std::set m_inflight_ops; - const char **get_tracked_conf_keys() const override; + std::vector get_tracked_keys() const noexcept override { + return std::vector{m_config_key}; + } void handle_conf_change(const ConfigProxy& conf, const std::set &changed) override; };