From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBbdc-0000Wh-Al for qemu-devel@nongnu.org; Fri, 19 May 2017 02:43:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBbdY-000498-CX for qemu-devel@nongnu.org; Fri, 19 May 2017 02:43:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56512) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dBbdY-00048x-66 for qemu-devel@nongnu.org; Fri, 19 May 2017 02:43:44 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0741A3D944 for ; Fri, 19 May 2017 06:43:42 +0000 (UTC) From: Peter Xu Date: Fri, 19 May 2017 14:43:26 +0800 Message-Id: <1495176212-14446-1-git-send-email-peterx@redhat.com> Subject: [Qemu-devel] [PATCH RFC 0/6] migration: enable return-path for precopy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Juan Quintela , "Dr . David Alan Gilbert" , peterx@redhat.com This idea derives from the bug reported: https://bugzilla.redhat.com/show_bug.cgi?id=1439147 It is not a extremely critical bug, since as long as the user uses libvirt to migrate, we won't have such an issue at all (we'll have identical command line parameters for QEMU). However it can be an severe one, since it caused data loss (source VM will quit assuming that destination VM is good, while it is not). So it would be good we fix it. Meanwhile, imho the return path may be used for other things as well in the future. This series proposed a solution for the bug - let's enable return path even for precopy when possible, then source can know whether dest is good or not, then it can decide to do something better than quit. The series is marked as RFC for two reasons: One point for RFC is the idea in general that whether we would like to enable return path for precopy. I see it okay since after all it's optional (so it greatly reduces the chance that QEMU command line user will lose the data, and this feature will be automatically off when we are using e.g. "exec:" to migrate to a file). The other one point is that I converted MigrationState into a QObject (actually a QDevice) to let migration codes benefits from some general framework advantages. I got at least one positive feedback on each of the RFC elements mentioned above, so dare I post this to public. Though I guess some migration reviewers may be on PTO recently (I just know it :), I still decided to post this out for a broader rfc review. Smoke test done, and of course I verified this series to fix the bug mentioned. Please review. Thanks. Peter Xu (6): io: only allow return path for socket typed migration: isolate return path on src migration: fix leak of src file on dst migration: shut src return path unconditionally migration: let MigrationState be an QObject migration: enable return path for precopy include/hw/compat.h | 4 ++ include/io/channel.h | 1 + include/migration/migration.h | 27 ++++++++- include/qemu/typedefs.h | 1 - io/channel-socket.c | 1 + migration/migration.c | 133 +++++++++++++++++++++++++++++++----------- migration/postcopy-ram.c | 1 - migration/qemu-file-channel.c | 9 +++ migration/trace-events | 4 +- 9 files changed, 140 insertions(+), 41 deletions(-) -- 2.7.4