From patchwork Fri Mar 18 14:30:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= X-Patchwork-Id: 8620721 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 52575C0553 for ; Fri, 18 Mar 2016 14:37:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C2151202E9 for ; Fri, 18 Mar 2016 14:37:44 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 258EA20268 for ; Fri, 18 Mar 2016 14:37:44 +0000 (UTC) Received: from localhost ([::1]:44060 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agvX5-0003Nn-DZ for patchwork-qemu-devel@patchwork.kernel.org; Fri, 18 Mar 2016 10:37:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agvR2-000852-5N for qemu-devel@nongnu.org; Fri, 18 Mar 2016 10:31:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1agvR1-00024J-80 for qemu-devel@nongnu.org; Fri, 18 Mar 2016 10:31:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43657) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1agvR1-00023z-3J for qemu-devel@nongnu.org; Fri, 18 Mar 2016 10:31:27 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id BF19CC00F236 for ; Fri, 18 Mar 2016 14:31:26 +0000 (UTC) Received: from t530wlan.home.berrange.com.com ([10.42.17.224]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2IEVBe8000806; Fri, 18 Mar 2016 10:31:25 -0400 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Fri, 18 Mar 2016 14:30:42 +0000 Message-Id: <1458311463-28272-8-git-send-email-berrange@redhat.com> In-Reply-To: <1458311463-28272-1-git-send-email-berrange@redhat.com> References: <1458311463-28272-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Amit Shah , "Dr. David Alan Gilbert" , Juan Quintela Subject: [Qemu-devel] [PATCH v5 07/28] migration: force QEMUFile to blocking mode for outgoing migration 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+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Instead of relying on the default QEMUFile I/O blocking flag state, explicitly turn on blocking I/O for outgoing migration since it takes place in a background thread. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Daniel P. Berrange --- migration/migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/migration.c b/migration/migration.c index a06566f..ca611e5 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1769,6 +1769,7 @@ void migrate_fd_connect(MigrationState *s) s->expected_downtime = max_downtime/1000000; s->cleanup_bh = qemu_bh_new(migrate_fd_cleanup, s); + qemu_file_set_blocking(s->to_dst_file, true); qemu_file_set_rate_limit(s->to_dst_file, s->bandwidth_limit / XFER_LIMIT_RATIO);