]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/image: use internal feature flag mask when creating images
authorJason Dillaman <dillaman@redhat.com>
Fri, 18 Dec 2020 14:48:58 +0000 (09:48 -0500)
committerNathan Cutler <ncutler@suse.com>
Thu, 28 Jan 2021 10:57:48 +0000 (11:57 +0100)
When validating the provided features for an image, utilize the
RBD_FEATURES_INTERNAL flag instead of just RBD_FEATURE_OPERATION.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 7dd77814402f0710f9283084b45960a054078897)

src/librbd/image/CreateRequest.cc

index 686e7639474961585f03a27f09b64936b940cdd9..f4b058e99c0daf268263b321a7c20b8d685d2ed7 100644 (file)
@@ -38,7 +38,7 @@ int validate_features(CephContext *cct, uint64_t features,
     lderr(cct) << "librbd does not support requested features." << dendl;
     return -ENOSYS;
   }
-  if ((features & RBD_FEATURE_OPERATIONS) != 0) {
+  if ((features & RBD_FEATURES_INTERNAL) != 0) {
     lderr(cct) << "cannot use internally controlled features" << dendl;
     return -EINVAL;
   }