diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:17 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:17 +0000 |
commit | b98f2fb9922af9b7a8ec418716d79ee2a4af5b77 (patch) | |
tree | a0f4f617c881a28eb0d52754b15b0a082bb545e1 /src/osd/OSDMap.cc | |
parent | Adding debian version 18.2.2-1. (diff) | |
download | ceph-b98f2fb9922af9b7a8ec418716d79ee2a4af5b77.tar.xz ceph-b98f2fb9922af9b7a8ec418716d79ee2a4af5b77.zip |
Merging upstream version 18.2.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/osd/OSDMap.cc')
-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; |