]> git-server-git.apps.pok.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 15:33:32 +0000 (16:33 +0100)
commita08c7da7dcc0e7f754f5e224c5cf79e25f097d71
tree6e1c986d0d20531a14131478f275365ee97d6dee
parent0c98b16b7933276c56c8be896cf72e3eb35df7e3
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