]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd/object_map: allow intermediate snaps to be skipped on diff-iterate
authorIlya Dryomov <idryomov@gmail.com>
Sat, 23 Dec 2023 13:47:54 +0000 (14:47 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 2 Feb 2024 14:36:57 +0000 (15:36 +0100)
commit2b03b30725f83ba5222f627fd660fcfbbfaed128
tree35632bfb10e87ebf8eacbd0ec75b9622c058b725
parent84de1b1cd3c54da45a3168e75b570413c8b4906d
librbd/object_map: allow intermediate snaps to be skipped on diff-iterate

In case of diff-iterate against the beginning of time, the result
depends only on the end version.  Loading and processing object maps
or intermediate snapshots is redundant and can be skipped.

This optimization is made possible by commit be507aaed15f ("librbd:
diff-iterate shouldn't ever report "new hole" against a hole") and, to
a lesser extent, the previous commit.

Getting FastDiffInvalid, LoadObjectMapError and ObjectMapTooSmall to
pass required tweaking not just expectations, but also start/end snap
ids and thus also the meaning of these tests.  This is addressed in the
next commit.

Fixes: https://tracker.ceph.com/issues/63341
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 23c675f04a4b4bb00794bbc59493d9591625a0a7)
src/librbd/object_map/DiffRequest.cc
src/test/librbd/object_map/test_mock_DiffRequest.cc