Skip to content

Commit 3290433

Browse files
committed
rbd/throttler: replace obsolete get_tracked_conf_keys()
.. with get_tracked_keys(). Following ceph#61394, all uses of the deprecated interface will be updated, and that old interface will be removed. Signed-off-by: Ronen Friedman <[email protected]>
1 parent 4325a50 commit 3290433

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/tools/rbd_mirror/Throttler.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ namespace mirror {
3030
template <typename I>
3131
Throttler<I>::Throttler(CephContext *cct, const std::string &config_key)
3232
: m_cct(cct), m_config_key(config_key),
33-
m_config_keys{m_config_key.c_str(), nullptr},
3433
m_lock(ceph::make_mutex(
3534
librbd::util::unique_lock_name("rbd::mirror::Throttler", this))),
3635
m_max_concurrent_ops(cct->_conf.get_val<uint64_t>(m_config_key)) {
@@ -221,11 +220,6 @@ void Throttler<I>::print_status(ceph::Formatter *f) {
221220
f->dump_int("waiting_requests", m_queue.size());
222221
}
223222

224-
template <typename I>
225-
const char** Throttler<I>::get_tracked_conf_keys() const {
226-
return m_config_keys;
227-
}
228-
229223
template <typename I>
230224
void Throttler<I>::handle_conf_change(const ConfigProxy& conf,
231225
const std::set<std::string> &changed) {

src/tools/rbd_mirror/Throttler.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@ class Throttler : public md_config_obs_t {
5353

5454
CephContext *m_cct;
5555
const std::string m_config_key;
56-
mutable const char* m_config_keys[2];
5756

5857
ceph::mutex m_lock;
5958
uint32_t m_max_concurrent_ops;
6059
std::list<Id> m_queue;
6160
std::map<Id, Context *> m_queued_ops;
6261
std::set<Id> m_inflight_ops;
6362

64-
const char **get_tracked_conf_keys() const override;
63+
std::vector<std::string> get_tracked_keys() const noexcept override {
64+
return std::vector<std::string>{m_config_key};
65+
}
6566
void handle_conf_change(const ConfigProxy& conf,
6667
const std::set<std::string> &changed) override;
6768
};

0 commit comments

Comments
 (0)