On Fri, Nov 27, 2015 at 01:14:25PM +0800, Fam Zheng wrote:
> On Fri, 11/27 10:48, Peter Xu wrote:
[snip]
>
> This patch doesn't handle the incoming migration case, i.e. when QEMU is
> started with "-incoming", or "-incoming defer". Dump can go wrong when
> incoming
> migration happens at the same time.
Sorry to missed these lines. Still not understand why this patch
cannot handle this if with [1] (Please check below for [1])?
[snip]
> >
> > +extern GlobalDumpState global_dump_state;
>
> dump_state_get_global() returns a pointer to the local static variable, why do
> you need this?
Yes, I should remove that. Thanks!
[snip]
> > +
> > @@ -1590,6 +1674,14 @@ void qmp_dump_guest_memory(bool paging, const char
> > *file,
> > int fd = -1;
> > DumpState *s;
> > Error *local_err = NULL;
> > + /* by default, we are keeping the old style, which is sync dump */
> > + bool detach_p = false;
> > + GlobalDumpState *global = dump_state_get_global();
> > +
[1]
> > + if (runstate_check(RUN_STATE_INMIGRATE)) {
> > + error_setg(errp, "Dump not allowed during incoming migration.");
> > + return;
> > + }
Thanks.
Peter