From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38826) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNomv-0000jv-MS for qemu-devel@nongnu.org; Mon, 15 Oct 2012 13:49:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TNomu-0001vN-Dd for qemu-devel@nongnu.org; Mon, 15 Oct 2012 13:49:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43764) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TNomu-0001vG-5b for qemu-devel@nongnu.org; Mon, 15 Oct 2012 13:49:12 -0400 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 (8.14.4/8.14.4) with ESMTP id q9FHnBQl028338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Oct 2012 13:49:11 -0400 Message-ID: <507C4C93.7050004@redhat.com> Date: Mon, 15 Oct 2012 19:49:07 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1348675011-8794-1-git-send-email-pbonzini@redhat.com> <1348675011-8794-29-git-send-email-pbonzini@redhat.com> In-Reply-To: <1348675011-8794-29-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 28/45] mirror: implement completion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: jcody@redhat.com, qemu-devel@nongnu.org Am 26.09.2012 17:56, schrieb Paolo Bonzini: > Switching to the target of the migration is done mostly asynchronously, > and reported to management via the BLOCK_JOB_COMPLETED event; the only > synchronous phase is opening the backing files. bdrv_open_backing_file > can always be done, even for migration of the full image (aka sync: > 'full'). In this case, qmp_drive_mirror will create the target disk > with no backing file at all, and bdrv_open_backing_file will be a no-op. > > Signed-off-by: Paolo Bonzini > --- > block/mirror.c | 41 ++++++++++++++++++++++++++++++++++++----- > 1 file modificato, 36 inserzioni(+), 5 rimozioni(-) > > diff --git a/block/mirror.c b/block/mirror.c > index 09ea020..939834d 100644 > --- a/block/mirror.c > +++ b/block/mirror.c > @@ -32,6 +32,8 @@ typedef struct MirrorBlockJob { > RateLimit limit; > BlockDriverState *target; > MirrorSyncMode mode; > + bool synced; > + bool complete; Maybe rename this to should_complete or completion_requested? For a few seconds I thought this would indicate that the job has completed. Kevin