]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: don't remove an image w/ incompatible features 13156/head
authorDongsheng Yang <dongsheng.yang@easystack.cn>
Fri, 23 Dec 2016 02:00:41 +0000 (21:00 -0500)
committerNathan Cutler <ncutler@suse.com>
Fri, 27 Jan 2017 17:28:58 +0000 (18:28 +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 68d195be5e2f7f539b3c9616bd9c18fcad5138b2..6a8b15920d037027abbf5d450f76aabe369b1734 100644 (file)
@@ -2112,6 +2112,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;