From: Mykola Golub Date: Wed, 23 May 2018 14:46:25 +0000 (+0300) Subject: librbd: allow 'migrating' internal feature on image create X-Git-Tag: v14.0.1~590^2~23 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=813e5f28cf248f58747b0503d2ed1f7c594ce437;p=ceph.git librbd: allow 'migrating' internal feature on image create We want this feature set from the start to avoid races when a client is opening an image being prepared for migration. Signed-off-by: Mykola Golub --- diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc index bfc1ea3154bb8..b357957969406 100644 --- a/src/cls/rbd/cls_rbd.cc +++ b/src/cls/rbd/cls_rbd.cc @@ -538,9 +538,8 @@ int create(cls_method_context_t hctx, bufferlist *in, bufferlist *out) omap_vals["snap_seq"] = snap_seqbl; omap_vals["create_timestamp"] = create_timestampbl; - if ((features & RBD_FEATURES_INTERNAL) != 0ULL) { - CLS_ERR("Attempting to set internal feature: %" PRIu64, - static_cast(features & RBD_FEATURES_INTERNAL)); + if ((features & RBD_FEATURE_OPERATIONS) != 0ULL) { + CLS_ERR("Attempting to set internal feature: operations"); return -EINVAL; } diff --git a/src/librbd/image/CreateRequest.cc b/src/librbd/image/CreateRequest.cc index bda59eb8dfd66..3dec768b05b9f 100644 --- a/src/librbd/image/CreateRequest.cc +++ b/src/librbd/image/CreateRequest.cc @@ -36,7 +36,7 @@ int validate_features(CephContext *cct, uint64_t features, lderr(cct) << "librbd does not support requested features." << dendl; return -ENOSYS; } - if ((features & RBD_FEATURES_INTERNAL) != 0) { + if ((features & RBD_FEATURE_OPERATIONS) != 0) { lderr(cct) << "cannot use internally controlled features" << dendl; return -EINVAL; }