]> git-server-git.apps.pok.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)
committerJason Dillaman <dillaman@redhat.com>
Fri, 18 Dec 2020 14:48:58 +0000 (09:48 -0500)
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>
src/librbd/image/CreateRequest.cc

index abf434920945abeedd0100564a7a8d268aaa09b1..f3ab967d1c28b0f6aace85489f27dd917141c686 100644 (file)
@@ -40,7 +40,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;
   }