From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2YQ4-0000ZR-W7 for qemu-devel@nongnu.org; Sat, 28 Nov 2015 00:51:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2YQ1-0008Jy-QW for qemu-devel@nongnu.org; Sat, 28 Nov 2015 00:51:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2YQ1-0008Jd-Lg for qemu-devel@nongnu.org; Sat, 28 Nov 2015 00:51:33 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 45BDD58 for ; Sat, 28 Nov 2015 05:51:32 +0000 (UTC) Date: Sat, 28 Nov 2015 13:51:23 +0800 From: Peter Xu Message-ID: <20151128055122.GA16816@pxdev.xzpeter.org> References: <1448592497-2462-1-git-send-email-peterx@redhat.com> <1448592497-2462-4-git-send-email-peterx@redhat.com> <20151127051425.GC14568@ad.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20151127051425.GC14568@ad.usersys.redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 3/8] dump-guest-memory: add basic "detach" support. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: pbonzini@redhat.com, qemu-devel@nongnu.org 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