diff options
Diffstat (limited to '')
-rw-r--r-- | src/osd/OSDMap.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index 11f9a87d7..5fb73084d 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -933,6 +933,10 @@ void OSDMap::Incremental::decode(ceph::buffer::list::const_iterator& bl) decode(new_last_up_change, bl); decode(new_last_in_change, bl); } + if (struct_v >= 9) { + decode(new_pg_upmap_primary, bl); + decode(old_pg_upmap_primary, bl); + } DECODE_FINISH(bl); // client-usable data } @@ -1871,6 +1875,18 @@ uint64_t OSDMap::get_up_osd_features() const return cached_up_osd_features; } +bool OSDMap::any_osd_laggy() const +{ + for (int osd = 0; osd < max_osd; ++osd) { + if (!is_up(osd)) { continue; } + const auto &xi = get_xinfo(osd); + if (xi.laggy_probability || xi.laggy_interval) { + return true; + } + } + return false; +} + void OSDMap::dedup(const OSDMap *o, OSDMap *n) { using ceph::encode; |