From: Dongsheng Yang Date: Fri, 23 Dec 2016 02:00:41 +0000 (-0500) Subject: librbd: don't remove an image w/ incompatible features X-Git-Tag: v12.0.0~267^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f76127b5e617923d14adb62bfb836a635c14f209;p=ceph.git librbd: don't remove an image w/ incompatible features Fixes: http://tracker.ceph.com/issues/18315 Signed-off-by: Dongsheng Yang --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 0807113a997e..bf94a72cc115 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -1502,6 +1502,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;