From patchwork Wed Aug 5 15:07:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Lalancette X-Patchwork-Id: 30797 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 9818AB7257 for ; Thu, 6 Aug 2009 01:08:42 +1000 (EST) Received: from localhost ([127.0.0.1]:40772 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYi6U-0005XL-Tw for incoming@patchwork.ozlabs.org; Wed, 05 Aug 2009 11:08:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MYi5h-0005Gy-Aj for qemu-devel@nongnu.org; Wed, 05 Aug 2009 11:07:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MYi5c-0005EC-70 for qemu-devel@nongnu.org; Wed, 05 Aug 2009 11:07:44 -0400 Received: from [199.232.76.173] (port=45134 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MYi5c-0005E7-1N for qemu-devel@nongnu.org; Wed, 05 Aug 2009 11:07:40 -0400 Received: from mx2.redhat.com ([66.187.237.31]:48870) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MYi5b-00015G-HC for qemu-devel@nongnu.org; Wed, 05 Aug 2009 11:07:39 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n75F7cHu025093 for ; Wed, 5 Aug 2009 11:07:38 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n75F7anH004917; Wed, 5 Aug 2009 11:07:37 -0400 Received: from localhost.localdomain (vpn-12-43.rdu.redhat.com [10.11.12.43]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n75F7Z3e013473; Wed, 5 Aug 2009 11:07:36 -0400 From: Chris Lalancette To: qemu-devel@nongnu.org Date: Wed, 5 Aug 2009 17:07:35 +0200 Message-Id: <1249484855-23277-1-git-send-email-clalance@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: Chris Lalancette Subject: [Qemu-devel] [PATCH] 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 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 --- migration-exec.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/migration-exec.c b/migration-exec.c index e3616be..ef4620f 100644 --- a/migration-exec.c +++ b/migration-exec.c @@ -73,10 +73,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");