Skip to content

Commit

Permalink
common, doc, include, mds, mon: add feature/release name squid
Browse files Browse the repository at this point in the history
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
  • Loading branch information
rzarzynski committed May 9, 2023
1 parent 99f0525 commit b437346
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 11 deletions.
12 changes: 6 additions & 6 deletions doc/dev/release-checklists.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ Define release names and constants

Make sure X (and, ideally, X+1) is defined:

- [ ] src/common/ceph_releases.h (`ceph_release_t`)
- [ ] src/common/ceph_strings.cc (`ceph_release_name()`)
- [ ] src/include/rados.h (`CEPH_RELEASE_*` and `MAX`)
- [ ] src/include/rbd/librbd.h (`LIBRBD_VER_MINOR` to X)
- [ ] src/mon/mon_types.h (`ceph::features::mon::FEATURE_*` and related structs and helpers; note that monmaptool CLI test output will need adjustment)
- [ ] src/mds/cephfs_features.h (`CEPHFS_CURRENT_RELEASE`)
- [x] src/common/ceph_releases.h (`ceph_release_t`)
- [x] src/common/ceph_strings.cc (`ceph_release_name()`)
- [x] src/include/rados.h (`CEPH_RELEASE_*` and `MAX`)
- [x] src/include/rbd/librbd.h (`LIBRBD_VER_MINOR` to X)
- [x] src/mon/mon_types.h (`ceph::features::mon::FEATURE_*` and related structs and helpers; note that monmaptool CLI test output will need adjustment)
- [x] src/mds/cephfs_features.h (`CEPHFS_CURRENT_RELEASE`)

Scripts
~~~~~~~
Expand Down
1 change: 1 addition & 0 deletions src/common/ceph_releases.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ enum class ceph_release_t : std::uint8_t {
pacific,
quincy,
reef,
squid,
max,
};

Expand Down
2 changes: 2 additions & 0 deletions src/common/ceph_strings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ const char *ceph_release_name(int r)
return "quincy";
case CEPH_RELEASE_REEF:
return "reef";
case CEPH_RELEASE_SQUID:
return "squid";
default:
if (r < 0)
return "unspecified";
Expand Down
3 changes: 2 additions & 1 deletion src/include/rados.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ extern const char *ceph_osd_state_name(int s);
#define CEPH_RELEASE_PACIFIC 16
#define CEPH_RELEASE_QUINCY 17
#define CEPH_RELEASE_REEF 18
#define CEPH_RELEASE_MAX 19 /* highest + 1 */
#define CEPH_RELEASE_SQUID 19
#define CEPH_RELEASE_MAX 20 /* highest + 1 */

/*
* The error code to return when an OSD can't handle a write
Expand Down
2 changes: 1 addition & 1 deletion src/include/rbd/librbd.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extern "C" {
#include "features.h"

#define LIBRBD_VER_MAJOR 1
#define LIBRBD_VER_MINOR 18
#define LIBRBD_VER_MINOR 19
#define LIBRBD_VER_EXTRA 0

#define LIBRBD_VERSION(maj, min, extra) ((maj << 16) + (min << 8) + extra)
Expand Down
2 changes: 1 addition & 1 deletion src/mds/cephfs_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace ceph {
// and update Server::update_required_client_features(). This feature bit
// is used to indicate that operator only wants clients from that release or
// later to mount CephFS.
#define CEPHFS_CURRENT_RELEASE CEPH_RELEASE_REEF
#define CEPHFS_CURRENT_RELEASE CEPH_RELEASE_SQUID

// The first 5 bits are reserved for old ceph releases.
#define CEPHFS_FEATURE_JEWEL 5
Expand Down
14 changes: 12 additions & 2 deletions src/mon/mon_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,9 @@ namespace ceph {
constexpr mon_feature_t FEATURE_PACIFIC( (1ULL << 6));
// elector pinging and CONNECTIVITY mode:
constexpr mon_feature_t FEATURE_PINGING( (1ULL << 7));
constexpr mon_feature_t FEATURE_QUINCY( (1ULL << 8));
constexpr mon_feature_t FEATURE_REEF( (1ULL << 9));
constexpr mon_feature_t FEATURE_QUINCY( (1ULL << 8));
constexpr mon_feature_t FEATURE_REEF( (1ULL << 9));
constexpr mon_feature_t FEATURE_SQUID( (1ULL << 10));

constexpr mon_feature_t FEATURE_RESERVED( (1ULL << 63));
constexpr mon_feature_t FEATURE_NONE( (0ULL));
Expand All @@ -510,6 +511,7 @@ namespace ceph {
FEATURE_PINGING |
FEATURE_QUINCY |
FEATURE_REEF |
FEATURE_SQUID |
FEATURE_NONE
);
}
Expand All @@ -535,6 +537,7 @@ namespace ceph {
FEATURE_PINGING |
FEATURE_QUINCY |
FEATURE_REEF |
FEATURE_SQUID |
FEATURE_NONE
);
}
Expand All @@ -553,6 +556,9 @@ namespace ceph {

static inline ceph_release_t infer_ceph_release_from_mon_features(mon_feature_t f)
{
if (f.contains_all(ceph::features::mon::FEATURE_SQUID)) {
return ceph_release_t::squid;
}
if (f.contains_all(ceph::features::mon::FEATURE_REEF)) {
return ceph_release_t::reef;
}
Expand Down Expand Up @@ -603,6 +609,8 @@ static inline const char *ceph::features::mon::get_feature_name(uint64_t b) {
return "quincy";
} else if (f == FEATURE_REEF) {
return "reef";
} else if (f == FEATURE_SQUID) {
return "squid";
} else if (f == FEATURE_RESERVED) {
return "reserved";
}
Expand Down Expand Up @@ -631,6 +639,8 @@ inline mon_feature_t ceph::features::mon::get_feature_by_name(const std::string
return FEATURE_QUINCY;
} else if (n == "reef") {
return FEATURE_REEF;
} else if (n == "squid") {
return FEATURE_SQUID;
} else if (n == "reserved") {
return FEATURE_RESERVED;
}
Expand Down

0 comments on commit b437346

Please sign in to comment.