Received: from eggs.gnu.org ([2001:4830:134:3::10]:56801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWGyk-00007O-Sg for qemu-devel@nongnu.org; Thu, 18 Feb 2016 00:18:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWGyh-00031r-MW for qemu-devel@nongnu.org; Thu, 18 Feb 2016 00:18:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35615) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWGyh-00031c-Hm for qemu-devel@nongnu.org; Thu, 18 Feb 2016 00:18:11 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 458D9A2C08 for ; Thu, 18 Feb 2016 05:18:11 +0000 (UTC) From: Peter Xu Date: Thu, 18 Feb 2016 13:16:51 +0800 Message-Id: <1455772616-8668-7-git-send-email-peterx@redhat.com> In-Reply-To: <1455772616-8668-1-git-send-email-peterx@redhat.com> References: <1455772616-8668-1-git-send-email-peterx@redhat.com> Subject: [Qemu-devel] [PATCH v8 06/11] dump-guest-memory: disable dump when in INMIGRATE state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: drjones@redhat.com, famz@redhat.com, armbru@redhat.com, peterx@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com, lersek@redhat.com Signed-off-by: Peter Xu Reviewed-by: Fam Zheng --- dump.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dump.c b/dump.c index fed84a6..923e3a5 100644 --- a/dump.c +++ b/dump.c @@ -1654,6 +1654,11 @@ void qmp_dump_guest_memory(bool paging, const char *file, DumpState *s; Error *local_err = NULL; + if (runstate_check(RUN_STATE_INMIGRATE)) { + error_setg(errp, "Dump not allowed during incoming migration."); + return; + } + /* if there is a dump in background, we should wait until the dump * finished */ if (dump_in_progress()) { -- 2.4.3