From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfeHe-00082F-RM for qemu-devel@nongnu.org; Fri, 15 Jun 2012 17:42:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SfeHd-0006XV-1Y for qemu-devel@nongnu.org; Fri, 15 Jun 2012 17:42:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfeHc-0006XO-Pm for qemu-devel@nongnu.org; Fri, 15 Jun 2012 17:42:20 -0400 Message-ID: <4FDBAC38.60701@redhat.com> Date: Fri, 15 Jun 2012 15:42:16 -0600 From: Eric Blake MIME-Version: 1.0 References: <1339772759-31004-1-git-send-email-pbonzini@redhat.com> <1339772759-31004-29-git-send-email-pbonzini@redhat.com> In-Reply-To: <1339772759-31004-29-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigED739C2DA9432BDD0D300505" Subject: Re: [Qemu-devel] [RFC PATCH 28/36] block: add block-job-complete List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, lcapitulino@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigED739C2DA9432BDD0D300505 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/15/2012 09:05 AM, Paolo Bonzini wrote: > While streaming can be dropped as soon as it progressed through the who= le > image, mirroring needs to be completed manually for two reasons: 1) so = that > management knows exactly when the VM switches to the target; 2) because= > for other use cases such as replication, we may leave the operation run= ning > for the whole life of the virtual machine. >=20 > Add a new block job command that manually completes background operatio= ns. >=20 > ## > +# @block-job-complete: > +# > +# Manually trigger completion of an active background block operation.= This > +# is supported for drive mirroring, where it also switches the device = to > +# write to the target path only. > +# > +# This command completes an active background block operation synchron= ously. > +# The ordering of this command's return with the BLOCK_JOB_COMPLETED e= vent > +# is not defined. Note that if an I/O error occurs during the process= ing of > +# this command: 1) the command itself will fail; 2) the error will be = processed > +# according to the rerror/werror arguments that were specified when st= arting > +# the operation. > +# > +# A cancelled or paused job cannot be completed. US vs. UK spelling. So 'block-job-complete' ends by pivoting or errors because it is not ready, 'block-job-cancel' without force ends with a clean mirror without pivoting or errors because it is not ready, and 'block-job-cancel' with force ends no matter what, even if it means a non-clean mirror. I think that was all the cases I asked for regarding a single disk. And hopefully we still have time to add additional patches to also support 'transaction' of combinations of these block actions across multiple disk= s. > +# > +# @device: the device name > +# > +# Returns: Nothing on success > +# If no background operation is active on this device, BlockJ= obNotActive > +# If the operation cannot be completed manually (either in ge= neral, or > +# not at the time the command is invoked), BlockJobNotReady= > +# > +# Since: 1.1 1.2 --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigED739C2DA9432BDD0D300505 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJP26w4AAoJEKeha0olJ0Nqk/AH/3I0XhiVFc5dirSo6rFC10jG 7xVYzq2hts/B9Dx2+kpAE4Z7XTLwLFWXp5D47Lt9bOqXysn7mzVPfBqwgEDRhMIt aeB8fd9oRu9laghcGlJ5atL7Ijx/CdIT2sCqUW2XxpOVrmz9iB5QqdFmS9w/w7GG FZwj1X0H1GNNhTMW3+YQk/9musZOE/x7fTJOgPog/BHwu5eDUhRjbFt0bbQce8TC MrPstpVunXdCz9jv2xdD0iIz3P60e7JYRRT/NfdFPcTiNWZtbWUFpszsQNg8etaj PHRfgVY6X1OjuOoDI4c01QCM+gRo3R9nfyGrRrEbFP54Ldz0Lzw1kI+F7Iv9K8I= =5f4M -----END PGP SIGNATURE----- --------------enigED739C2DA9432BDD0D300505--