From 872c1b91a98deab1c21d85454d452914adf2c4fe Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Tue, 12 Jul 2022 22:33:45 +0800 Subject: [PATCH] mds: add CEPHFS_FEATURE_OP_GETVXATTR feature bit support For old ceph if they receive unknown OPs, they will crash the MDS daemons directly. So we need to distiguish whether the new OPs is supported by the peer MDSs or not. Fixes: https://tracker.ceph.com/issues/56529 Signed-off-by: Xiubo Li (cherry picked from commit c7a0e71040e2a008497d4d7e2249f514bf082c92) --- src/mds/cephfs_features.cc | 1 + src/mds/cephfs_features.h | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mds/cephfs_features.cc b/src/mds/cephfs_features.cc index afa7e7d4cd48a..3c7949c5ed7f8 100644 --- a/src/mds/cephfs_features.cc +++ b/src/mds/cephfs_features.cc @@ -24,6 +24,7 @@ static const std::array feature_names "metric_collect", "alternate_name", "notify_session_state", + "op_getvxattr", }; static_assert(feature_names.size() == CEPHFS_FEATURE_MAX + 1); diff --git a/src/mds/cephfs_features.h b/src/mds/cephfs_features.h index 169af793fc014..d1fc942666603 100644 --- a/src/mds/cephfs_features.h +++ b/src/mds/cephfs_features.h @@ -44,7 +44,8 @@ namespace ceph { #define CEPHFS_FEATURE_METRIC_COLLECT 14 #define CEPHFS_FEATURE_ALTERNATE_NAME 15 #define CEPHFS_FEATURE_NOTIFY_SESSION_STATE 16 -#define CEPHFS_FEATURE_MAX 16 +#define CEPHFS_FEATURE_OP_GETVXATTR 17 +#define CEPHFS_FEATURE_MAX 17 #define CEPHFS_FEATURES_ALL { \ 0, 1, 2, 3, 4, \ @@ -62,6 +63,7 @@ namespace ceph { CEPHFS_FEATURE_METRIC_COLLECT, \ CEPHFS_FEATURE_ALTERNATE_NAME, \ CEPHFS_FEATURE_NOTIFY_SESSION_STATE, \ + CEPHFS_FEATURE_OP_GETVXATTR, \ } #define CEPHFS_METRIC_FEATURES_ALL { \ -- 2.39.5