]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: don't remove an image w/ incompatible features 13247/head
authorDongsheng Yang <dongsheng.yang@easystack.cn>
Fri, 23 Dec 2016 02:00:41 +0000 (21:00 -0500)
committerNathan Cutler <ncutler@suse.com>
Fri, 3 Feb 2017 12:46:35 +0000 (13:46 +0100)
Fixes: http://tracker.ceph.com/issues/18315
Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
(cherry picked from commit f76127b5e617923d14adb62bfb836a635c14f209)

src/librbd/internal.cc

index 8512e6f4999cc74f479ebab77147bfa2368a3063..749a66b040809d6d45c39e901005c78efc1e836d 100644 (file)
@@ -1583,6 +1583,9 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force,
     if (r < 0) {
       ldout(cct, 2) << "error opening image: " << cpp_strerror(-r) << dendl;
       delete ictx;
+      if (r != -ENOENT) {
+       return r;
+      }
     } else {
       string header_oid = ictx->header_oid;
       old_format = ictx->old_format;