]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cls/rbd: set_features should adjust the mask to known features
authorJason Dillaman <dillaman@redhat.com>
Tue, 20 Sep 2016 18:34:16 +0000 (14:34 -0400)
committerLoic Dachary <ldachary@redhat.com>
Thu, 13 Oct 2016 08:24:33 +0000 (10:24 +0200)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit a26c7a5cacebf8814e20a2f3d5b69c20d8798871)

src/cls/rbd/cls_rbd.cc

index c430adf77a6c8752e6ca4879695d9584eb396503..6adc31fa25cdca7dcc5a0d0574293d106fd7eedf 100644 (file)
@@ -409,6 +409,9 @@ int set_features(cls_method_context_t hctx, bufferlist *in, bufferlist *out)
     return r;
   }
 
+  // newer clients might attempt to mask off features we don't support
+  mask &= RBD_FEATURES_ALL;
+
   uint64_t enabled_features = features & mask;
   if ((enabled_features & RBD_FEATURES_MUTABLE) != enabled_features) {
     CLS_ERR("Attempting to enable immutable feature: %" PRIu64,