Skip to content

Commit

Permalink
crush,osd: s/chooseargs/choose_args/
Browse files Browse the repository at this point in the history
Signed-off-by: Loic Dachary <[email protected]>
  • Loading branch information
ldachary committed May 12, 2017
1 parent 404cee7 commit 3099684
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/crush/CrushWrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ bool CrushWrapper::is_v5_rule(unsigned ruleid) const
return false;
}

bool CrushWrapper::has_chooseargs() const
bool CrushWrapper::has_choose_args() const
{
return !choose_args.empty();
}

bool CrushWrapper::has_incompat_chooseargs() const
bool CrushWrapper::has_incompat_choose_args() const
{
// FIXME: if the chooseargs all have 1 position *and* do not remap IDs then
// we can fabricate a compatible crush map for legacy clients by swapping the
Expand Down
4 changes: 2 additions & 2 deletions src/crush/CrushWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,8 @@ class CrushWrapper {
bool has_v3_rules() const;
bool has_v4_buckets() const;
bool has_v5_rules() const;
bool has_chooseargs() const; // any chooseargs
bool has_incompat_chooseargs() const; // chooseargs that can't be made compat
bool has_choose_args() const; // any choose_args
bool has_incompat_choose_args() const; // choose_args that can't be made compat

bool is_v2_rule(unsigned ruleid) const;
bool is_v3_rule(unsigned ruleid) const;
Expand Down
4 changes: 2 additions & 2 deletions src/include/ceph_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ DEFINE_CEPH_FEATURE(21, 2, SERVER_LUMINOUS)
DEFINE_CEPH_FEATURE(21, 2, RESEND_ON_SPLIT) // overlap
DEFINE_CEPH_FEATURE(21, 2, RADOS_BACKOFF) // overlap
DEFINE_CEPH_FEATURE(21, 2, OSDMAP_PG_UPMAP) // overlap
DEFINE_CEPH_FEATURE(21, 2, CRUSH_CHOOSEARGS) // overlap
DEFINE_CEPH_FEATURE(21, 2, CRUSH_CHOOSE_ARGS) // overlap
DEFINE_CEPH_FEATURE_RETIRED(22, 1, BACKFILL_RESERVATION, JEWEL, LUMINOUS)

DEFINE_CEPH_FEATURE(23, 1, MSG_AUTH)
Expand Down Expand Up @@ -253,7 +253,7 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin
CEPH_FEATURE_CRUSH_TUNABLES5 | \
CEPH_FEATURE_CRUSH_V2 | \
CEPH_FEATURE_CRUSH_V4 | \
CEPH_FEATURE_CRUSH_CHOOSEARGS)
CEPH_FEATURE_CRUSH_CHOOSE_ARGS)

/*
* make sure we don't try to use the reserved features
Expand Down
6 changes: 3 additions & 3 deletions src/osd/OSDMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1167,8 +1167,8 @@ uint64_t OSDMap::get_features(int entity_type, uint64_t *pmask) const
features |= CEPH_FEATURE_CRUSH_V4;
if (crush->has_nondefault_tunables5())
features |= CEPH_FEATURE_CRUSH_TUNABLES5;
if (crush->has_incompat_chooseargs())
features |= CEPH_FEATURE_CRUSH_CHOOSEARGS;
if (crush->has_incompat_choose_args())
features |= CEPH_FEATURE_CRUSH_CHOOSE_ARGS;
mask |= CEPH_FEATURES_CRUSH;

if (!pg_upmap.empty() || !pg_upmap_items.empty())
Expand Down Expand Up @@ -1250,7 +1250,7 @@ pair<string,string> OSDMap::get_min_compat_client() const
uint64_t f = get_features(CEPH_ENTITY_TYPE_CLIENT, nullptr);

if (HAVE_FEATURE(f, OSDMAP_PG_UPMAP) || // v12.0.0-1733-g27d6f43
HAVE_FEATURE(f, CRUSH_CHOOSEARGS)) { // v12.0.1-2172-gef1ef28
HAVE_FEATURE(f, CRUSH_CHOOSE_ARGS)) { // v12.0.1-2172-gef1ef28
return make_pair("luminous", "12.2.0");
}
if (HAVE_FEATURE(f, CRUSH_TUNABLES5)) { // v10.0.0-612-g043a737
Expand Down

0 comments on commit 3099684

Please sign in to comment.