From patchwork Tue Jan 12 11:44:00 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: 566503 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 323241402C4 for ; Tue, 12 Jan 2016 22:47:04 +1100 (AEDT) Received: from localhost ([::1]:59326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIxPh-0005xo-Q5 for incoming@patchwork.ozlabs.org; Tue, 12 Jan 2016 06:47:01 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIxNU-0001M9-Gr for qemu-devel@nongnu.org; Tue, 12 Jan 2016 06:44:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aIxNN-00049f-02 for qemu-devel@nongnu.org; Tue, 12 Jan 2016 06:44:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aIxNM-00049b-Ry for qemu-devel@nongnu.org; Tue, 12 Jan 2016 06:44:36 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 7AD9A13929 for ; Tue, 12 Jan 2016 11:44:36 +0000 (UTC) Received: from t530wlan.home.berrange.com.com (vpn1-7-155.ams2.redhat.com [10.36.7.155]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0CBiQA5011644; Tue, 12 Jan 2016 06:44:35 -0500 From: "Daniel P. Berrange" To: qemu-devel@nongnu.org Date: Tue, 12 Jan 2016 11:44:00 +0000 Message-Id: <1452599056-27357-7-git-send-email-berrange@redhat.com> In-Reply-To: <1452599056-27357-1-git-send-email-berrange@redhat.com> References: <1452599056-27357-1-git-send-email-berrange@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 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 v1 06/22] 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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. Signed-off-by: Daniel P. Berrange Reviewed-by: Dr. David Alan Gilbert --- migration/migration.c | 1 + 1 file changed, 1 insertion(+) diff --git a/migration/migration.c b/migration/migration.c index c964a8d..715f069 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1732,6 +1732,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->file, true); qemu_file_set_rate_limit(s->file, s->bandwidth_limit / XFER_LIMIT_RATIO);