]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: allow 'migrating' internal feature on image create
authorMykola Golub <mgolub@suse.com>
Wed, 23 May 2018 14:46:25 +0000 (17:46 +0300)
committerJason Dillaman <dillaman@redhat.com>
Tue, 14 Aug 2018 22:29:45 +0000 (18:29 -0400)
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 <mgolub@suse.com>
src/cls/rbd/cls_rbd.cc
src/librbd/image/CreateRequest.cc

index bfc1ea3154bb8b7ae74764a589ba0ec3b7bbd83a..b35795796940679d7fa341647f3ad1a4134849cc 100644 (file)
@@ -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<uint64_t>(features & RBD_FEATURES_INTERNAL));
+  if ((features & RBD_FEATURE_OPERATIONS) != 0ULL) {
+    CLS_ERR("Attempting to set internal feature: operations");
     return -EINVAL;
   }
 
index bda59eb8dfd66bfe3d3c64fbc610eb39bcbcc693..3dec768b05b9fef396c0707e20358925239a1640 100644 (file)
@@ -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;
   }