From: Jason Dillaman Date: Tue, 20 Sep 2016 18:34:16 +0000 (-0400) Subject: cls/rbd: set_features should adjust the mask to known features X-Git-Tag: v11.0.1~137^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a26c7a5cacebf8814e20a2f3d5b69c20d8798871;p=ceph.git cls/rbd: set_features should adjust the mask to known features Signed-off-by: Jason Dillaman --- diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc index f7bf2e334110..c90bc3353263 100644 --- a/src/cls/rbd/cls_rbd.cc +++ b/src/cls/rbd/cls_rbd.cc @@ -414,6 +414,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,