From patchwork Fri Mar 11 16:37:41 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: 8567541 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 05546C0553 for ; Fri, 11 Mar 2016 16:40:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7279C20268 for ; Fri, 11 Mar 2016 16:40:42 +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 CC76D201F5 for ; Fri, 11 Mar 2016 16:40:41 +0000 (UTC) Received: from localhost ([::1]:56390 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeQ7F-0003B1-3e for patchwork-qemu-devel@patchwork.kernel.org; Fri, 11 Mar 2016 11:40:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53905) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeQ50-0007pY-7V for qemu-devel@nongnu.org; Fri, 11 Mar 2016 11:38:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aeQ4w-0005LP-5Z for qemu-devel@nongnu.org; Fri, 11 Mar 2016 11:38:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41770) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aeQ4v-0005LC-S0 for qemu-devel@nongnu.org; Fri, 11 Mar 2016 11:38:18 -0500 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 7FACA4B0C6 for ; Fri, 11 Mar 2016 16:38:17 +0000 (UTC) Received: from t530wlan.home.berrange.com.com (vpn1-6-25.ams2.redhat.com [10.36.6.25]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2BGc5Oh002899; Fri, 11 Mar 2016 11:38:16 -0500 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Fri, 11 Mar 2016 16:37:41 +0000 Message-Id: <1457714282-6981-8-git-send-email-berrange@redhat.com> In-Reply-To: <1457714282-6981-1-git-send-email-berrange@redhat.com> References: <1457714282-6981-1-git-send-email-berrange@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 , "Dr. David Alan Gilbert" , Juan Quintela Subject: [Qemu-devel] [PATCH v4 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 942c22d..8fdd630 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1770,6 +1770,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);