]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
interval_map: non_const iterator
authorAlex Ainscow <aainscow@uk.ibm.com>
Mon, 12 May 2025 17:30:02 +0000 (18:30 +0100)
committerAlex Ainscow <aainscow@uk.ibm.com>
Fri, 1 Aug 2025 10:12:42 +0000 (11:12 +0100)
commit6715ca4754b1a42c989f7c66a017ebf399690a3f
tree5c50fae205f284b4bf2dc93158c2473e58f7f5a8
parentfa9a554bea81503c14c79ca6ff16739ca4658c91
interval_map: non_const iterator

The interval_map code cannot cope with iterators which change the size
of an interval. Due to this, they use const iterators. However, many
other modifications to intervals ARE ok and more efficient, nicer
looking code can be written with them.

This PR adds non-const iterators, but also adds some policing that the
size of the bufferlist has not changed over the interval.

Everything is hidden behind a template, as this changes the behaviour of interval map in a way that we don't want to use without careful testing of each instance.

Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
(cherry picked from commit 360b079bc5e703754a7c27091370f910a78de2ba)
src/common/interval_map.h
src/test/common/test_interval_map.cc