]> git.apps.os.sepia.ceph.com Git - ceph.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>
Sat, 20 Jan 2024 18:00:24 +0000 (19:00 +0100)
commit37a60dc529720c5e3b409208c196765189dc2792
tree5aabec6b34de42dbcee535ffa8a9555001f1e53a
parente09332a8f82839a855b341fcaf52998dd2cec45d
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