]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd/object_map: resurrect diff-iterate behavior when image is shrunk
authorIlya Dryomov <idryomov@gmail.com>
Fri, 22 Dec 2023 17:50:20 +0000 (18:50 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 2 Feb 2024 14:36:57 +0000 (15:36 +0100)
commit84de1b1cd3c54da45a3168e75b570413c8b4906d
treee7b915fd9d80cf8f0769e4a5a2925174983ceb6b
parentcb924241f76ca60f8ddc1152b3cf8bd16254ed66
librbd/object_map: resurrect diff-iterate behavior when image is shrunk

The new "track the largest of all versions in the set, diff state is
only ever grown" semantics introduced in commit 330f2a7bb94f ("librbd:
helper state machine for computing diffs between object-maps") don't
make sense for diff-iterate.  It's a waste because DiffIterate won't
query beyond the end version size -- this is baked into the API.

Limit this behavior to deep-copy and resurrect the original behavior
from 2015 for diff-iterate.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 19c7c4a5359fa9c1d06cc11187e300251249ad9e)
src/librbd/object_map/DiffRequest.cc
src/test/librbd/object_map/test_mock_DiffRequest.cc