Skip to content

Commit 9859e8d

Browse files
committed
osd: Make new EC use non-const iterators
Signed-off-by: Alex Ainscow <[email protected]>
1 parent 360b079 commit 9859e8d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/osd/ECUtil.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ struct bl_split_merge {
5454

5555
using extent_set = interval_set<uint64_t, boost::container::flat_map, false>;
5656
using extent_map = interval_map<uint64_t, ceph::buffer::list, bl_split_merge,
57-
boost::container::flat_map>;
57+
boost::container::flat_map, true>;
5858

5959
/* Slice iterator. This looks for contiguous buffers which are common
6060
* across all shards in the out_set.
@@ -70,8 +70,8 @@ class slice_iterator {
7070
uint64_t length = std::numeric_limits<uint64_t>::max();
7171
uint64_t start = std::numeric_limits<uint64_t>::max();
7272
uint64_t end = std::numeric_limits<uint64_t>::max();
73-
shard_id_map<std::pair<extent_map::const_iterator,
74-
bufferlist::const_iterator>> iters;
73+
shard_id_map<std::pair<extent_map::iterator,
74+
bufferlist::iterator>> iters;
7575
shard_id_map<bufferptr> in;
7676
shard_id_map<bufferptr> out;
7777
const shard_id_set &out_set;
@@ -975,10 +975,10 @@ class shard_extent_map_t {
975975
size_t shard_count() { return extent_maps.size(); }
976976

977977

978-
void assert_buffer_contents_equal(shard_extent_map_t other) const {
978+
void assert_buffer_contents_equal(shard_extent_map_t other) {
979979
for (auto &&[shard, emap] : extent_maps) {
980980
for (auto &&i : emap) {
981-
bufferlist bl = i.get_val();
981+
bufferlist &bl = i.get_val();
982982
bufferlist otherbl;
983983
other.get_buffer(shard, i.get_off(), i.get_len(), otherbl);
984984
ceph_assert(bl.contents_equal(otherbl));

0 commit comments

Comments
 (0)