diff mbox

[v4,06/11] dump-guest-memory: disable dump when in INMIGRATE state

Message ID 1448976530-15984-7-git-send-email-peterx@redhat.com
State New
Headers show

Commit Message

Peter Xu Dec. 1, 2015, 1:28 p.m. UTC
Signed-off-by: Peter Xu <peterx@redhat.com>
---
 dump.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Fam Zheng Dec. 2, 2015, 12:50 a.m. UTC | #1
On Tue, 12/01 21:28, Peter Xu wrote:
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
>  dump.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/dump.c b/dump.c
> index e46749d..65d1f7e 100644
> --- a/dump.c
> +++ b/dump.c
> @@ -1626,13 +1626,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;
>      }
> -

Blank line change, please drop.

Fam

>      /*
>       * kdump-compressed format need the whole memory dumped, so paging or
>       * filter is not supported here.
> -- 
> 2.4.3
>
Peter Xu Dec. 2, 2015, 6:50 a.m. UTC | #2
On Wed, Dec 02, 2015 at 08:50:48AM +0800, Fam Zheng wrote:
> On Tue, 12/01 21:28, Peter Xu wrote:
> >      /* 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;
> >      }
> > -
> 
> Blank line change, please drop.

Ok.

Thanks.
Peter

> 
> Fam
diff mbox

Patch

diff --git a/dump.c b/dump.c
index e46749d..65d1f7e 100644
--- a/dump.c
+++ b/dump.c
@@ -1626,13 +1626,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.