]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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, 13 Jun 2025 14:34:02 +0000 (15:34 +0100)
commit360b079bc5e703754a7c27091370f910a78de2ba
tree73b9870983f85586d70418be219cc526c96f8442
parent3fb436a0c703417a3a762503881c401af1a1b4d3
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>
src/common/interval_map.h
src/test/common/test_interval_map.cc