]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: skip fast-diff optimization when deep copying with flatten
authorMykola Golub <mgolub@suse.com>
Wed, 2 Dec 2020 13:02:30 +0000 (13:02 +0000)
committerMykola Golub <mgolub@suse.com>
Sun, 6 Dec 2020 07:23:37 +0000 (09:23 +0200)
Even if a source object does not exist we still may need to copy
from the source parent.

Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit 816680174db18ef5d1fe87c5c3451821d9b6def8)

src/librbd/deep_copy/ImageCopyRequest.cc

index 87eda9385bf0a8c38440558df5f287688934353b..17aaa533efa4b4f73730c3c04db411f2a7b45bec 100644 (file)
@@ -92,6 +92,11 @@ void ImageCopyRequest<I>::map_src_objects(uint64_t dst_object,
 
 template <typename I>
 void ImageCopyRequest<I>::compute_diff() {
+  if (m_flatten) {
+    send_object_copies();
+    return;
+  }
+
   ldout(m_cct, 10) << dendl;
 
   auto ctx = create_context_callback<