]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: remove image_mapped condition to remove image_map
authorArthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Thu, 22 Jul 2021 16:53:16 +0000 (18:53 +0200)
committerArthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
Wed, 12 Jan 2022 09:03:40 +0000 (10:03 +0100)
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 <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit 35398a5e17dc5a536ccd63417c937f2efe742654)

src/tools/rbd_mirror/ImageMap.cc

index 6a308019f693423e976c5863ae9167b6df453a6d..6a091ac99445a0528a4c97b3596e541dac51cf76 100644 (file)
@@ -416,7 +416,7 @@ void ImageMap<I>::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);