]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: force a copyup object map update if migration completes 27357/head
authorJason Dillaman <dillaman@redhat.com>
Mon, 8 Apr 2019 17:42:16 +0000 (13:42 -0400)
committerJason Dillaman <dillaman@redhat.com>
Mon, 8 Apr 2019 17:42:16 +0000 (13:42 -0400)
If a live-migration copyup was in-progress when the copyup completes,
force the object map to be updated.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/io/CopyupRequest.cc

index d2727dd7d64ba0b6fb4086c990efcdb0fc34a1d9..2299d3bf341961bac7ac2f6344d0d7414d0776d7 100644 (file)
@@ -552,6 +552,12 @@ bool CopyupRequest<I>::is_update_object_map_required(int r) {
     return false;
   }
 
+  if (m_image_ctx->migration_info.empty()) {
+    // migration might have completed while IO was in-flight,
+    // assume worst-case and perform an object map update
+    return true;
+  }
+
   auto it = m_image_ctx->migration_info.snap_map.find(CEPH_NOSNAP);
   ceph_assert(it != m_image_ctx->migration_info.snap_map.end());
   return it->second[0] != CEPH_NOSNAP;