From 3ea18e670358766bbba8364016819d00be96e9fa Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Thu, 13 Mar 2025 22:51:22 +0530 Subject: [PATCH] rbd-mirror: fix issues with rebase * revert changes to remote_namespace_set * revert change in PoolWatcher::notify_listener() Signed-off-by: Prasanna Kumar Kalever --- src/librbd/api/Mirror.cc | 14 -------------- src/tools/rbd_mirror/PoolWatcher.cc | 2 +- 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/librbd/api/Mirror.cc b/src/librbd/api/Mirror.cc index 24136f21c8e90..73f7fa9bb4b1e 100644 --- a/src/librbd/api/Mirror.cc +++ b/src/librbd/api/Mirror.cc @@ -1576,20 +1576,6 @@ int Mirror::remote_namespace_set(librados::IoCtx& io_ctx, CephContext *cct = reinterpret_cast(io_ctx.cct()); ldout(cct, 20) << dendl; - std::string local_namespace = io_ctx.get_namespace(); - - if (local_namespace.empty() && !remote_namespace.empty()) { - lderr(cct) << "cannot mirror the default namespace to a " - << "non-default namespace." << dendl; - return -EINVAL; - } - - if (!local_namespace.empty() && remote_namespace.empty()) { - lderr(cct) << "cannot mirror a non-default namespace to the default " - << "namespace." << dendl; - return -EINVAL; - } - int r = cls_client::mirror_remote_namespace_set(&io_ctx, remote_namespace); if (r < 0) { lderr(cct) << "failed to set remote mirror namespace: " diff --git a/src/tools/rbd_mirror/PoolWatcher.cc b/src/tools/rbd_mirror/PoolWatcher.cc index c6ebd5e7a9c06..24c0dbeb8ca3e 100644 --- a/src/tools/rbd_mirror/PoolWatcher.cc +++ b/src/tools/rbd_mirror/PoolWatcher.cc @@ -464,8 +464,8 @@ void PoolWatcher::notify_listener() { auto it = m_entities.find(entity); if (it != m_entities.end()) { m_entities.erase(entity); + m_entities.insert({entity, id}); } - m_entities.insert({entity, id}); } m_pending_removed_entities.clear(); -- 2.39.5