]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd/object_map: add support for ranged diff-iterate
authorIlya Dryomov <idryomov@gmail.com>
Wed, 27 Dec 2023 17:07:05 +0000 (18:07 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Sat, 20 Jan 2024 15:06:53 +0000 (16:06 +0100)
commit0b5ba5fedf704ada74a65108af129eae6baea5c5
tree0c25e289f8d2efc7ccfbd3ea51ccbec5d8816e78
parent94bf3a5d74cfd61e0bd881ca2863fe2205f27767
librbd/object_map: add support for ranged diff-iterate

Currently diff-iterate in fast-diff mode is performed on the entire
image no matter what image extent is passed to the API.  Then, unused
diff just gets discarded as DiffIterate ends up querying only objects
that the passed image extent maps to.  This hasn't been an issue for
internal consumers ("rbd du", "rbd diff", etc) because they work on the
entire image, but turns out to lead to quadratic slowdown in some QEMU
use cases.

0..UINT64_MAX range is carved out for deep-copy which is unranged by
definition.  To get effectively unranged diff-iterate, 0..UINT64_MAX-1
range can be used.

Fixes: https://tracker.ceph.com/issues/63341
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
src/librbd/api/DiffIterate.cc
src/librbd/api/DiffIterate.h
src/librbd/deep_copy/ImageCopyRequest.cc
src/librbd/object_map/DiffRequest.cc
src/librbd/object_map/DiffRequest.h
src/test/librbd/deep_copy/test_mock_ImageCopyRequest.cc
src/test/librbd/object_map/test_mock_DiffRequest.cc