From patchwork Wed Jul 1 10:39:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 490051 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D91621402A3 for ; Wed, 1 Jul 2015 20:48:36 +1000 (AEST) Received: from localhost ([::1]:57065 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAFZC-000543-CO for incoming@patchwork.ozlabs.org; Wed, 01 Jul 2015 06:48:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAFRF-00083J-Rs for qemu-devel@nongnu.org; Wed, 01 Jul 2015 06:40:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAFRA-0002Rj-4Z for qemu-devel@nongnu.org; Wed, 01 Jul 2015 06:40:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54289) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAFR9-0002RW-VL for qemu-devel@nongnu.org; Wed, 01 Jul 2015 06:40:16 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 964F2B1F87 for ; Wed, 1 Jul 2015 10:40:15 +0000 (UTC) Received: from trasno.mitica (ovpn-116-22.ams2.redhat.com [10.36.116.22]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t61Adp3r016283; Wed, 1 Jul 2015 06:40:14 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 1 Jul 2015 12:39:37 +0200 Message-Id: <1435747190-18017-14-git-send-email-quintela@redhat.com> In-Reply-To: <1435747190-18017-1-git-send-email-quintela@redhat.com> References: <1435747190-18017-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: amit.shah@redhat.com, "Dr. David Alan Gilbert" Subject: [Qemu-devel] [PULL 13/26] Fail more cleanly in mismatched RAM cases X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 Signed-off-by: Juan Quintela --- migration/rdma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/migration/rdma.c b/migration/rdma.c index 73a79be..f106b2a 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -3328,6 +3328,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; } @@ -3343,6 +3344,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 =