From e19869fbfcebe2edd5d927aae966aea1a1bd77d7 Mon Sep 17 00:00:00 2001 From: Arthur Outhenin-Chalandre Date: Thu, 22 Jul 2021 18:53:16 +0200 Subject: [PATCH] rbd-mirror: remove image_mapped condition to remove image_map In some split-brain scenario the image is removed while the image_mapped is false. This prevents the removal of image_map in OMAP and thus the entry will not be removed until the daemon is restarted. Signed-off-by: Arthur Outhenin-Chalandre (cherry picked from commit 35398a5e17dc5a536ccd63417c937f2efe742654) --- src/tools/rbd_mirror/ImageMap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/rbd_mirror/ImageMap.cc b/src/tools/rbd_mirror/ImageMap.cc index 4493e073b98b..d352fcb2c140 100644 --- a/src/tools/rbd_mirror/ImageMap.cc +++ b/src/tools/rbd_mirror/ImageMap.cc @@ -416,7 +416,7 @@ void ImageMap::update_images_removed( to_remove.emplace_back(global_image_id, info.instance_id); } - if (image_mapped && image_removed) { + if (image_removed) { // local and peer images have been deleted if (m_policy->remove_image(global_image_id)) { schedule_action(global_image_id); -- 2.47.3