dump-guest-memory: disable dump when in INMIGRATE state

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Message-Id: <1455772616-8668-7-git-send-email-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Peter Xu 2016-02-18 13:16:51 +08:00 committed by Paolo Bonzini
parent ca1fc8c97e
commit 63e27f28f2

5
dump.c
View File

@ -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()) {