From: Alex Ainscow Date: Mon, 12 May 2025 17:46:49 +0000 (+0100) Subject: osd: Make new EC use non-const iterators X-Git-Tag: testing/wip-vshankar-testing-20250710.130520-debug~6^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9859e8dcfcc5defeb8650e192433fd35cc4d5d0d;p=ceph-ci.git osd: Make new EC use non-const iterators Signed-off-by: Alex Ainscow --- diff --git a/src/osd/ECUtil.h b/src/osd/ECUtil.h index f0abbb0cd3c..166bcdb3e3c 100644 --- a/src/osd/ECUtil.h +++ b/src/osd/ECUtil.h @@ -54,7 +54,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. @@ -70,8 +70,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; @@ -975,10 +975,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));