]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: skip fast-diff optimization when deep copying with flatten 38389/head
authorMykola Golub <mgolub@suse.com>
Wed, 2 Dec 2020 13:02:30 +0000 (13:02 +0000)
committerMykola Golub <mgolub@suse.com>
Wed, 2 Dec 2020 13:02:30 +0000 (13:02 +0000)
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>
src/librbd/deep_copy/ImageCopyRequest.cc

index 716341891c5a6ca34965eb321966385b73841b2c..37b3e0fbd4e6c10bacdbf7cca5de28b8feb0af18 100644 (file)
@@ -90,6 +90,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<