From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z366z-0002Ks-Gs for qemu-devel@nongnu.org; Thu, 11 Jun 2015 13:17:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z366y-0007cu-CT for qemu-devel@nongnu.org; Thu, 11 Jun 2015 13:17:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z366y-0007ci-7t for qemu-devel@nongnu.org; Thu, 11 Jun 2015 13:17:52 -0400 From: "Dr. David Alan Gilbert (git)" Date: Thu, 11 Jun 2015 18:17:28 +0100 Message-Id: <1434043048-4444-13-git-send-email-dgilbert@redhat.com> In-Reply-To: <1434043048-4444-1-git-send-email-dgilbert@redhat.com> References: <1434043048-4444-1-git-send-email-dgilbert@redhat.com> Subject: [Qemu-devel] [PATCH v2 12/12] Fail more cleanly in mismatched RAM cases List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, arei.gonglei@huawei.com, mrhines@us.ibm.com, quintela@redhat.com From: "Dr. David Alan Gilbert" If the number of RAMBlocks was different on the source from the destination, QEMU would hang waiting for a disconnect on the source and wouldn't release from that hang until the destination was manually killed. Mark the stream as being in error, this causes the destination to die and the source to carry on. (It still gets a whole bunch of warnings on the destination, and I've not managed to complete another migration after the 1st one, still progress). Signed-off-by: Dr. David Alan Gilbert --- migration/rdma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/rdma.c b/migration/rdma.c index 1f3a9fb..9156308 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -3320,6 +3320,7 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque, "Your QEMU command line parameters are probably " "not identical on both the source and destination.", local->nb_blocks, nb_dest_blocks); + rdma->error_state = -EINVAL; return -EINVAL; } @@ -3335,6 +3336,7 @@ static int qemu_rdma_registration_stop(QEMUFile *f, void *opaque, "vs %" PRIu64, local->block[i].block_name, i, local->block[i].length, rdma->dest_blocks[i].length); + rdma->error_state = -EINVAL; return -EINVAL; } local->block[i].remote_host_addr = -- 2.4.2