]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
remove invalid objectmap flag when objectmap is disabled 9555/head
authorxinxin shu <shuxinxin@chinac.com>
Thu, 2 Jun 2016 06:13:09 +0000 (14:13 +0800)
committerAbhishek Varshney <abhishek.varshney@flipkart.com>
Tue, 7 Jun 2016 13:55:15 +0000 (19:25 +0530)
Fixes: http://tracker.ceph.com/issues/16076
Signed-off-by: xinxin shu <shuxinxin@chinac.com>
(cherry picked from commit b2d475686ee7617bb2023d753941e3d6952f0878)

src/librbd/internal.cc

index 2445bdacd3bab2964084337a4c9926f04d37690f..4563d33c8c35e484016fd6d65b5ce6c4f7d72855 100644 (file)
@@ -1776,7 +1776,7 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,
             return -EINVAL;
           }
 
-          disable_flags = RBD_FLAG_OBJECT_MAP_INVALID;
+          disable_flags |= RBD_FLAG_OBJECT_MAP_INVALID;
           r = remove_object_map(ictx);
           if (r < 0) {
             lderr(cct) << "failed to remove object map" << dendl;
@@ -1784,7 +1784,7 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,
           }
         }
         if ((features & RBD_FEATURE_FAST_DIFF) != 0) {
-          disable_flags = RBD_FLAG_FAST_DIFF_INVALID;
+          disable_flags |= RBD_FLAG_FAST_DIFF_INVALID;
         }
         if ((features & RBD_FEATURE_JOURNALING) != 0) {
           rbd_mirror_mode_t mirror_mode;