From: Jason Dillaman Date: Tue, 20 Sep 2016 18:47:36 +0000 (-0400) Subject: librbd: update_features should handle Infernalis OSDs X-Git-Tag: v11.0.1~137^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8cb2ccda1b847e0f33c0d34bf57e9ec29bbbb43b;p=ceph.git librbd: update_features should handle Infernalis OSDs Fixes: http://tracker.ceph.com/issues/17330 Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index 78b0057db841..ecc0f28a6793 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -1849,6 +1849,13 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force, << "mask=" << features_mask << dendl; r = librbd::cls_client::set_features(&ictx->md_ctx, ictx->header_oid, new_features, features_mask); + if (!enabled && r == -EINVAL) { + // NOTE: infernalis OSDs will not accept a mask with new features, so + // re-attempt with a reduced mask. + features_mask &= ~RBD_FEATURE_JOURNALING; + r = librbd::cls_client::set_features(&ictx->md_ctx, ictx->header_oid, + new_features, features_mask); + } if (r < 0) { lderr(cct) << "failed to update features: " << cpp_strerror(r) << dendl;