From 283ba2e6c88470f52bee765ea96c40ac66f26f36 Mon Sep 17 00:00:00 2001 From: Ramana Raja Date: Mon, 5 May 2025 14:29:08 -0400 Subject: [PATCH] tools/rbd/action/MirrorPool: remove dead branch mirror_image_get_info() API doesn't fail with ENOENT when mirroring is disabled since commit c9c8852. So, no need to handle ENOENT error from mirror_image_get_info() API. Signed-off-by: Ramana Raja (cherry picked from commit 268966a364468c12b675c8bfae762931a3ea102d) --- src/tools/rbd/action/MirrorPool.cc | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/tools/rbd/action/MirrorPool.cc b/src/tools/rbd/action/MirrorPool.cc index b0678a38d11..e35d3f1760d 100644 --- a/src/tools/rbd/action/MirrorPool.cc +++ b/src/tools/rbd/action/MirrorPool.cc @@ -471,10 +471,7 @@ private: void handle_get_info(int r) { dout(20) << this << " " << __func__ << ": r=" << r << dendl; - if (r == -ENOENT) { - close_image(); - return; - } else if (r < 0) { + if (r < 0) { std::cerr << "rbd: failed to retrieve mirror image info for " << m_image_name << ": " << cpp_strerror(r) << std::endl; m_ret_val = r; -- 2.39.5