From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3MiM-0000Hr-Bw for qemu-devel@nongnu.org; Mon, 30 Nov 2015 06:33:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a3MiF-0004qp-UL for qemu-devel@nongnu.org; Mon, 30 Nov 2015 06:33:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a3MiF-0004qi-FU for qemu-devel@nongnu.org; Mon, 30 Nov 2015 06:33:43 -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 3A6768E23E for ; Mon, 30 Nov 2015 11:33:43 +0000 (UTC) From: Peter Xu Date: Mon, 30 Nov 2015 19:32:14 +0800 Message-Id: <1448883140-20249-7-git-send-email-peterx@redhat.com> In-Reply-To: <1448883140-20249-1-git-send-email-peterx@redhat.com> References: <1448883140-20249-1-git-send-email-peterx@redhat.com> Subject: [Qemu-devel] [PATCH v3 06/12] 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, lersek@redhat.com, armbru@redhat.com, peterx@redhat.com, lcapitulino@redhat.com, famz@redhat.com, pbonzini@redhat.com Signed-off-by: Peter Xu --- dump.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dump.c b/dump.c index c8ae5c3..5b9def3 100644 --- a/dump.c +++ b/dump.c @@ -1628,13 +1628,17 @@ 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()) { error_setg(errp, "There is a dump in process, please wait."); return; } - /* * kdump-compressed format need the whole memory dumped, so paging or * filter is not supported here. -- 2.4.3