From: Jason Dillaman Date: Thu, 29 Oct 2020 14:10:56 +0000 (-0400) Subject: librbd: refresh full global config when applying metadata X-Git-Tag: v16.1.0~711^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F37894%2Fhead;p=ceph.git librbd: refresh full global config when applying metadata The ConfigProxy contains a point-in-time copy of the global config that is dynamically updated in CephContext::_conf. Upon an image refresh, pull the latest version of the global config from the CephContext and apply it to the config stored within the ImageCtx. Fixes: https://tracker.ceph.com/issues/48035 Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/ImageCtx.cc b/src/librbd/ImageCtx.cc index ec54762ce01b..c1856a0bf87b 100644 --- a/src/librbd/ImageCtx.cc +++ b/src/librbd/ImageCtx.cc @@ -729,14 +729,8 @@ librados::IoCtx duplicate_io_ctx(librados::IoCtx& io_ctx) { std::unique_lock image_locker(image_lock); // reset settings back to global defaults - for (auto& key : config_overrides) { - std::string value; - int r = cct->_conf.get_val(key, &value); - ceph_assert(r == 0); - - config.set_val(key, value); - } config_overrides.clear(); + config.set_config_values(cct->_conf.get_config_values()); // extract config overrides for (auto meta_pair : meta) {