From: Jason Dillaman Date: Tue, 25 Feb 2020 14:31:13 +0000 (-0500) Subject: rbd-mirror: no need to perform extra image-meta filtering for image-state X-Git-Tag: v15.1.1~224^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=04ab492d43322945829a40876feb9b50e5d7ca21;p=ceph-ci.git rbd-mirror: no need to perform extra image-meta filtering for image-state The image-state now only stores non RBD-internal image-meta keys and only non RBD-internal image-meta keys are returned from the image-meta helper state machine. Signed-off-by: Jason Dillaman --- diff --git a/src/tools/rbd_mirror/image_replayer/snapshot/ApplyImageStateRequest.cc b/src/tools/rbd_mirror/image_replayer/snapshot/ApplyImageStateRequest.cc index b0a0a2c3b3e..2ed3217388f 100644 --- a/src/tools/rbd_mirror/image_replayer/snapshot/ApplyImageStateRequest.cc +++ b/src/tools/rbd_mirror/image_replayer/snapshot/ApplyImageStateRequest.cc @@ -9,7 +9,6 @@ #include "librbd/Operations.h" #include "librbd/Utils.h" #include "librbd/image/GetMetadataRequest.h" -#include "librbd/mirror/snapshot/Utils.h" #include "tools/rbd_mirror/image_replayer/snapshot/Utils.h" #include @@ -169,12 +168,8 @@ void ApplyImageStateRequest::handle_get_image_meta(int r) { template void ApplyImageStateRequest::update_image_meta() { - auto key_filter = librbd::mirror::snapshot::util::get_image_meta_key(""); std::set keys_to_remove; for (const auto& [key, value] : m_metadata) { - if (boost::starts_with(key, key_filter)) { - continue; - } if (m_image_state.metadata.count(key) == 0) { dout(15) << "removing image-meta key '" << key << "'" << dendl; keys_to_remove.insert(key); @@ -183,10 +178,6 @@ void ApplyImageStateRequest::update_image_meta() { std::map metadata_to_update; for (const auto& [key, value] : m_image_state.metadata) { - if (boost::starts_with(key, key_filter)) { - continue; - } - auto it = m_metadata.find(key); if (it == m_metadata.end() || !it->second.contents_equal(value)) { dout(15) << "updating image-meta key '" << key << "'" << dendl;