From bdaf3281744b4ff25bc35023be6903c6a702d71a Mon Sep 17 00:00:00 2001 From: Alex Ainscow Date: Mon, 12 May 2025 18:46:49 +0100 Subject: [PATCH] osd: Make new EC use non-const iterators Signed-off-by: Alex Ainscow (cherry picked from commit 9859e8dcfcc5defeb8650e192433fd35cc4d5d0d) --- src/osd/ECUtil.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/osd/ECUtil.h b/src/osd/ECUtil.h index f6f21b05353c6..93c5e8b98499b 100644 --- a/src/osd/ECUtil.h +++ b/src/osd/ECUtil.h @@ -58,7 +58,7 @@ struct bl_split_merge { using extent_set = interval_set; using extent_map = interval_map; + boost::container::flat_map, true>; /* Slice iterator. This looks for contiguous buffers which are common * across all shards in the out_set. @@ -74,8 +74,8 @@ class slice_iterator { uint64_t length = std::numeric_limits::max(); uint64_t start = std::numeric_limits::max(); uint64_t end = std::numeric_limits::max(); - shard_id_map> iters; + shard_id_map> iters; shard_id_map in; shard_id_map out; const shard_id_set &out_set; @@ -992,10 +992,10 @@ public: size_t shard_count() { return extent_maps.size(); } - void assert_buffer_contents_equal(shard_extent_map_t other) const { + void assert_buffer_contents_equal(shard_extent_map_t other) { for (auto &&[shard, emap] : extent_maps) { for (auto &&i : emap) { - bufferlist bl = i.get_val(); + bufferlist &bl = i.get_val(); bufferlist otherbl; other.get_buffer(shard, i.get_off(), i.get_len(), otherbl); ceph_assert(bl.contents_equal(otherbl)); -- 2.39.5