From 329043355e6fe0a1440aeeac841b37fb1c958ba7 Mon Sep 17 00:00:00 2001 From: Ronen Friedman Date: Sun, 9 Mar 2025 11:57:40 -0500 Subject: [PATCH] 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 --- src/tools/rbd_mirror/Throttler.cc | 6 ------ src/tools/rbd_mirror/Throttler.h | 5 +++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/tools/rbd_mirror/Throttler.cc b/src/tools/rbd_mirror/Throttler.cc index 07d6e397ec66d..690f95c9f019a 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 32080238aea22..85cc2aab780c9 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; }; -- 2.39.5