From 816680174db18ef5d1fe87c5c3451821d9b6def8 Mon Sep 17 00:00:00 2001 From: Mykola Golub Date: Wed, 2 Dec 2020 13:02:30 +0000 Subject: [PATCH] librbd: skip fast-diff optimization when deep copying with flatten Even if a source object does not exist we still may need to copy from the source parent. Signed-off-by: Mykola Golub --- src/librbd/deep_copy/ImageCopyRequest.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/librbd/deep_copy/ImageCopyRequest.cc b/src/librbd/deep_copy/ImageCopyRequest.cc index 716341891c5..37b3e0fbd4e 100644 --- a/src/librbd/deep_copy/ImageCopyRequest.cc +++ b/src/librbd/deep_copy/ImageCopyRequest.cc @@ -90,6 +90,11 @@ void ImageCopyRequest::map_src_objects(uint64_t dst_object, template void ImageCopyRequest::compute_diff() { + if (m_flatten) { + send_object_copies(); + return; + } + ldout(m_cct, 10) << dendl; auto ctx = create_context_callback< -- 2.47.3