From: Arthur Outhenin-Chalandre Date: Thu, 22 Jul 2021 16:53:16 +0000 (+0200) Subject: rbd-mirror: remove image_mapped condition to remove image_map X-Git-Tag: v15.2.16~33^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=88da13495d5d58fc5caff59ea624f6a5e1a2b8d4;p=ceph.git 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) --- diff --git a/src/tools/rbd_mirror/ImageMap.cc b/src/tools/rbd_mirror/ImageMap.cc index 6a308019f69..6a091ac9944 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);