From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:38494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO2Se-0000MR-9n for qemu-devel@nongnu.org; Tue, 16 Oct 2012 04:25:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TO2SZ-0007rd-JJ for qemu-devel@nongnu.org; Tue, 16 Oct 2012 04:25:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:31500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TO2SZ-0007eG-7t for qemu-devel@nongnu.org; Tue, 16 Oct 2012 04:25:07 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q9G8P1xn021415 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 16 Oct 2012 04:25:01 -0400 Message-ID: <507D19DA.8030605@redhat.com> Date: Tue, 16 Oct 2012 10:24:58 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1348675011-8794-1-git-send-email-pbonzini@redhat.com> <1348675011-8794-27-git-send-email-pbonzini@redhat.com> <507C4065.2010508@redhat.com> <507D0089.8000104@redhat.com> In-Reply-To: <507D0089.8000104@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 26/45] mirror: introduce mirror job List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: jcody@redhat.com, qemu-devel@nongnu.org Am 16.10.2012 08:36, schrieb Paolo Bonzini: > Il 15/10/2012 18:57, Kevin Wolf ha scritto: >> Am 26.09.2012 17:56, schrieb Paolo Bonzini: >>> + >>> + /* We're out of the streaming phase. From now on, if the job >>> + * is cancelled we will actually complete all pending I/O and >>> + * report completion. This way, block-job-cancel will leave >>> + * the target in a consistent state. >>> + */ >> >> Don't we have block_job_complete() for that now? Then I think the job >> can be cancelled immediately, even in an inconsistent state. > > The idea was that block-job-cancel will still leave the target in a > consistent state if executed during the second phase. Otherwise it is > impossible to take a consistent snapshot and keep running on the first > image. Yes, I noticed that when reading one of the following patches. However, this behaviour didn't seem to be documented very well. IIRC, you do mention it in the QMP documentation for block-job-complete, but wouldn't it make sense to describe what cancel/complete mean in the documentation for drive-mirror as well? I'd also consider putting a comment in the code that explicitly says that we intentionally wait for a consistent state before actually cancelling. This is not the intuitive thing to do with cancel, so it confused me. Kevin