void PeeringState::proc_lease(const pg_lease_t& l)
{
- if (get_osdmap()->require_osd_release < ceph_release_t::octopus) {
+ if (!HAVE_FEATURE(upacting_features, SERVER_OCTOPUS)) {
return;
}
if (!is_nonprimary()) {
void PeeringState::proc_lease_ack(int from, const pg_lease_ack_t& a)
{
- if (get_osdmap()->require_osd_release < ceph_release_t::octopus) {
+ if (!HAVE_FEATURE(upacting_features, SERVER_OCTOPUS)) {
return;
}
auto now = pl->get_mnow();
bool PeeringState::check_prior_readable_down_osds(const OSDMapRef& map)
{
- if (get_osdmap()->require_osd_release < ceph_release_t::octopus) {
+ if (!HAVE_FEATURE(upacting_features, SERVER_OCTOPUS)) {
return false;
}
bool changed = false;
purged.intersection_of(to_trim, info.purged_snaps);
to_trim.subtract(purged);
- if (get_osdmap()->require_osd_release >= ceph_release_t::octopus) {
+ if (HAVE_FEATURE(upacting_features, SERVER_OCTOPUS)) {
renew_lease(pl->get_mnow());
schedule_renew_lease();
}
bool PrimaryLogPG::check_laggy(OpRequestRef& op)
{
- if (get_osdmap()->require_osd_release < ceph_release_t::octopus) {
- dout(10) << __func__ << " require_osd_release < octopus" << dendl;
+ if (!HAVE_FEATURE(recovery_state.get_min_upacting_features(),
+ SERVER_OCTOPUS)) {
+ dout(20) << __func__ << " not all upacting has SERVER_OCTOPUS" << dendl;
return true;
}
if (state_test(PG_STATE_WAIT)) {
bool PrimaryLogPG::check_laggy_requeue(OpRequestRef& op)
{
- if (get_osdmap()->require_osd_release < ceph_release_t::octopus) {
+ if (!HAVE_FEATURE(recovery_state.get_min_upacting_features(),
+ SERVER_OCTOPUS)) {
return true;
}
if (!state_test(PG_STATE_WAIT) && !state_test(PG_STATE_LAGGY)) {