]> 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 16:32:05 +0000 (18:32 +0200)
commitc80c2a1153a0360c0940e74b28ad523c04767687
tree717d28f68bb2b5f3967d095b280dc5e8aa6fe321
parent46c7999aab9891cf7e6f7d5ed571f7db020375ff
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)

Conflicts:
src/librbd/deep_copy/ImageCopyRequest.cc [ commit aabfb76e51bf
  ("librbd: swapped ThreadPool/ContextWQ for AsioEngine") not in
  octopus ]
src/test/librbd/deep_copy/test_mock_ImageCopyRequest.cc [
  commit 235b27a8f08a ("librbd/deep_copy: skip snap list if
  object is known to be clean") not in octopus ]
src/librbd/deep_copy/ImageCopyRequest.cc
src/test/librbd/deep_copy/test_mock_ImageCopyRequest.cc