Skip to content

Commit

Permalink
Merge pull request ceph#46398 from lxbsz/feature-cleanup
Browse files Browse the repository at this point in the history
mds, client: remove useless feature required code

Reviewed-by: Venky Shankar <[email protected]>
Reviewed-by: Jos Collin <[email protected]>
Reviewed-by: Dhairya Parmar <[email protected]>
  • Loading branch information
vshankar authored Jun 7, 2022
2 parents 8e2c921 + c6cb986 commit c44406e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
9 changes: 0 additions & 9 deletions src/client/Client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2330,15 +2330,6 @@ void Client::handle_client_session(const MConstRef<MClientSession>& m)
if (!session->seq && m->get_seq())
session->seq = m->get_seq();

feature_bitset_t missing_features(CEPHFS_FEATURES_CLIENT_REQUIRED);
missing_features -= m->supported_features;
if (!missing_features.empty()) {
lderr(cct) << "mds." << from << " lacks required features '"
<< missing_features << "', closing session " << dendl;
_close_mds_session(session.get());
_closed_mds_session(session.get(), -CEPHFS_EPERM, true);
break;
}
session->mds_features = std::move(m->supported_features);
session->mds_metric_flags = std::move(m->metric_spec.metric_flags);

Expand Down
2 changes: 1 addition & 1 deletion src/mds/MDSMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ bool MDSMap::is_degraded() const {

void MDSMap::set_min_compat_client(ceph_release_t version)
{
vector<size_t> bits = CEPHFS_FEATURES_MDS_REQUIRED;
vector<size_t> bits;

if (version >= ceph_release_t::octopus)
bits.push_back(CEPHFS_FEATURE_OCTOPUS);
Expand Down
3 changes: 0 additions & 3 deletions src/mds/cephfs_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@ namespace ceph {
}

#define CEPHFS_FEATURES_MDS_SUPPORTED CEPHFS_FEATURES_ALL
#define CEPHFS_FEATURES_MDS_REQUIRED {}

#define CEPHFS_FEATURES_CLIENT_SUPPORTED CEPHFS_FEATURES_ALL
#define CEPHFS_FEATURES_CLIENT_REQUIRED {}

extern std::string_view cephfs_feature_name(size_t id);
extern int cephfs_feature_from_name(std::string_view name);
Expand Down

0 comments on commit c44406e

Please sign in to comment.