]> git-server-git.apps.pok.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>
Tue, 26 Oct 2021 08:28:51 +0000 (10:28 +0200)
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 4493e073b98bc9a0827d369fa585b48184866a84..d352fcb2c14034b17e4e8466be607b4dd2b28d84 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);