]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: deep-copy should remove parent metadata if overlap updated
authorJason Dillaman <dillaman@redhat.com>
Tue, 15 May 2018 19:07:21 +0000 (15:07 -0400)
committerJason Dillaman <dillaman@redhat.com>
Sat, 19 May 2018 12:17:25 +0000 (08:17 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit af4298464d6809969eb35382b3cbbb1ea0b3bd1e)

src/librbd/deep_copy/SetHeadRequest.cc

index cab319820c15f9c73669b128e9f4c5e2d11d8768..ade87ba384d8b4bc0d3096f36a86430518bf62a5 100644 (file)
@@ -102,7 +102,8 @@ template <typename I>
 void SetHeadRequest<I>::send_remove_parent() {
   m_image_ctx->parent_lock.get_read();
   if (m_image_ctx->parent_md.spec.pool_id == -1 ||
-      m_image_ctx->parent_md.spec == m_parent_spec) {
+      (m_image_ctx->parent_md.spec == m_parent_spec &&
+       m_image_ctx->parent_md.overlap == m_parent_overlap)) {
     m_image_ctx->parent_lock.put_read();
     send_set_parent();
     return;