From patchwork Wed Aug 26 13:05:45 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 32167 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 532D7B7093 for ; Thu, 27 Aug 2009 03:29:06 +1000 (EST) Received: from localhost ([127.0.0.1]:44318 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgMIt-0003tV-8d for incoming@patchwork.ozlabs.org; Wed, 26 Aug 2009 13:28:59 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgLwi-0002Sn-IY for qemu-devel@nongnu.org; Wed, 26 Aug 2009 13:06:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgLwc-0002KQ-9k for qemu-devel@nongnu.org; Wed, 26 Aug 2009 13:06:02 -0400 Received: from [199.232.76.173] (port=45785 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgLwb-0002Jy-UR for qemu-devel@nongnu.org; Wed, 26 Aug 2009 13:05:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:27996) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MgLwb-0000Yi-7m for qemu-devel@nongnu.org; Wed, 26 Aug 2009 13:05:57 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n7QH5uoK031711; Wed, 26 Aug 2009 13:05:56 -0400 Received: from localhost.localdomain (virtlab1.virt.bos.redhat.com [10.16.72.21]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7QH5kJu009197; Wed, 26 Aug 2009 13:05:55 -0400 From: Glauber Costa To: qemu-devel@nongnu.org Date: Wed, 26 Aug 2009 09:05:45 -0400 Message-Id: <1251291946-25821-12-git-send-email-glommer@redhat.com> In-Reply-To: <1251291946-25821-11-git-send-email-glommer@redhat.com> References: <1251291946-25821-1-git-send-email-glommer@redhat.com> <1251291946-25821-2-git-send-email-glommer@redhat.com> <1251291946-25821-3-git-send-email-glommer@redhat.com> <1251291946-25821-4-git-send-email-glommer@redhat.com> <1251291946-25821-5-git-send-email-glommer@redhat.com> <1251291946-25821-6-git-send-email-glommer@redhat.com> <1251291946-25821-7-git-send-email-glommer@redhat.com> <1251291946-25821-8-git-send-email-glommer@redhat.com> <1251291946-25821-9-git-send-email-glommer@redhat.com> <1251291946-25821-10-git-send-email-glommer@redhat.com> <1251291946-25821-11-git-send-email-glommer@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Cc: aliguori@us.ibm.com, Chris Lalancette Subject: [Qemu-devel] [PATCH 11/12] Fix detached migration with exec. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Chris Lalancette When trying to do detached migration with exec, I found that the monitor wouldn't always return in a timely manner. I tracked this down to exec_start_outgoing_migration. It appeared we were setting the fd to NONBLOCK'ing, but in point of fact we weren't. This bugfix should also go onto the stable 0.10 branch Signed-off-by: Chris Lalancette Signed-off-by: Anthony Liguori Signed-off-by: Glauber Costa --- migration-exec.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/migration-exec.c b/migration-exec.c index ade592e..6786dbf 100644 --- a/migration-exec.c +++ b/migration-exec.c @@ -74,10 +74,7 @@ MigrationState *exec_start_outgoing_migration(const char *command, goto err_after_open; } - if (fcntl(s->fd, F_SETFD, O_NONBLOCK) == -1) { - dprintf("Unable to set nonblocking mode on file descriptor\n"); - goto err_after_open; - } + socket_set_nonblock(s->fd); s->opaque = qemu_popen(f, "w");