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: v10.2.4~31^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b4e13808b004fd10d342e3daa17a3d4e830d4d00;p=ceph.git cls/rbd: set_features should adjust the mask to known features Signed-off-by: Jason Dillaman (cherry picked from commit a26c7a5cacebf8814e20a2f3d5b69c20d8798871) --- diff --git a/src/cls/rbd/cls_rbd.cc b/src/cls/rbd/cls_rbd.cc index c430adf77a6c..6adc31fa25cd 100644 --- a/src/cls/rbd/cls_rbd.cc +++ b/src/cls/rbd/cls_rbd.cc @@ -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,