]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: update progress for non-existent objects on deep-copy
authorIlya Dryomov <idryomov@gmail.com>
Sun, 26 Jun 2022 11:05:09 +0000 (13:05 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 30 Jun 2022 13:04:31 +0000 (15:04 +0200)
commit4837e123d5ee6a6b481c1265eb409caacba43add
tree14d168a38a1222ea569d05afd6e02761de1e006d
parent7c4eda5154293382ddc7f2cb7d89c747f058823d
librbd: update progress for non-existent objects on deep-copy

As a side effect of commit e5a21e904142 ("librbd: deep-copy image copy
state machine skips clean objects"), handle_object_copy() stopped being
called for non-existent objects.  This broke progress_object_no logic,
which expects to "see" all object numbers so that update_progress()
callback invocations can be ordered.  Currently update_progress() based
progress reporting gets stuck after encountering a hole in the image.

To fix, arrange for handle_object_copy() to be called for all object
numbers, even if ObjectCopyRequest isn't created.  Defer the extra call
to the image work queue to avoid locking issues.

Fixes: https://tracker.ceph.com/issues/56181
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 6813a7879146aec40f204a174b40a5a54e00b780)
src/librbd/deep_copy/ImageCopyRequest.cc
src/test/librbd/deep_copy/test_mock_ImageCopyRequest.cc