diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:44 +0000 |
commit | 17d6a993fc17d533460c5f40f3908c708e057c18 (patch) | |
tree | 1a3bd93e0ecd74fa02f93a528fe2f87e5314c4b5 /src/crimson | |
parent | Releasing progress-linux version 18.2.2-0progress7.99u1. (diff) | |
download | ceph-17d6a993fc17d533460c5f40f3908c708e057c18.tar.xz ceph-17d6a993fc17d533460c5f40f3908c708e057c18.zip |
Merging upstream version 18.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/crimson')
-rw-r--r-- | src/crimson/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/crimson/common/config_proxy.h | 25 |
2 files changed, 19 insertions, 7 deletions
diff --git a/src/crimson/CMakeLists.txt b/src/crimson/CMakeLists.txt index e2b37fac9..723e6cb55 100644 --- a/src/crimson/CMakeLists.txt +++ b/src/crimson/CMakeLists.txt @@ -110,6 +110,7 @@ add_library(crimson-common STATIC ${PROJECT_SOURCE_DIR}/src/mds/FSMap.cc ${PROJECT_SOURCE_DIR}/src/mds/FSMapUser.cc ${PROJECT_SOURCE_DIR}/src/mds/MDSMap.cc + ${PROJECT_SOURCE_DIR}/src/mds/MDSAuthCaps.cc ${PROJECT_SOURCE_DIR}/src/msg/msg_types.cc ${PROJECT_SOURCE_DIR}/src/msg/Message.cc ${PROJECT_SOURCE_DIR}/src/mon/PGMap.cc diff --git a/src/crimson/common/config_proxy.h b/src/crimson/common/config_proxy.h index 4c0e65507..822db34f6 100644 --- a/src/crimson/common/config_proxy.h +++ b/src/crimson/common/config_proxy.h @@ -54,13 +54,18 @@ class ConfigProxy : public seastar::peering_sharded_service<ConfigProxy> // avoid racings with other do_change() calls in parallel. ObserverMgr<ConfigObserver>::rev_obs_map rev_obs; owner.values.reset(new_values); - owner.obs_mgr.for_each_change(owner.values->changed, owner, - [&rev_obs](ConfigObserver *obs, + std::map<std::string, bool> changes_present; + for (const auto& change : owner.values->changed) { + std::string dummy; + changes_present[change] = owner.get_val(change, &dummy); + } + owner.obs_mgr.for_each_change(changes_present, + [&rev_obs](auto obs, const std::string &key) { rev_obs[obs].insert(key); }, nullptr); for (auto& [obs, keys] : rev_obs) { - obs->handle_conf_change(owner, keys); + (*obs)->handle_conf_change(owner, keys); } return seastar::parallel_for_each(boost::irange(1u, seastar::smp::count), @@ -70,13 +75,19 @@ class ConfigProxy : public seastar::peering_sharded_service<ConfigProxy> proxy.values.reset(); proxy.values = std::move(foreign_values); + std::map<std::string, bool> changes_present; + for (const auto& change : proxy.values->changed) { + std::string dummy; + changes_present[change] = proxy.get_val(change, &dummy); + } + ObserverMgr<ConfigObserver>::rev_obs_map rev_obs; - proxy.obs_mgr.for_each_change(proxy.values->changed, proxy, - [&rev_obs](ConfigObserver *obs, const std::string& key) { + proxy.obs_mgr.for_each_change(changes_present, + [&rev_obs](auto obs, const std::string& key) { rev_obs[obs].insert(key); }, nullptr); - for (auto& obs_keys : rev_obs) { - obs_keys.first->handle_conf_change(proxy, obs_keys.second); + for (auto& [obs, keys] : rev_obs) { + (*obs)->handle_conf_change(proxy, keys); } }); }).finally([new_values] { |