From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36474) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuAat-0005xt-Lh for qemu-devel@nongnu.org; Wed, 25 Jul 2012 19:02:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SuAas-0004yI-Gh for qemu-devel@nongnu.org; Wed, 25 Jul 2012 19:02:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30470) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SuAas-0004yE-87 for qemu-devel@nongnu.org; Wed, 25 Jul 2012 19:02:14 -0400 Message-ID: <50107AF2.2030108@redhat.com> Date: Wed, 25 Jul 2012 17:02:10 -0600 From: Eric Blake MIME-Version: 1.0 References: <1343127865-16608-1-git-send-email-pbonzini@redhat.com> <1343127865-16608-28-git-send-email-pbonzini@redhat.com> In-Reply-To: <1343127865-16608-28-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig64DAA7AB7D9215134593109A" Subject: Re: [Qemu-devel] [PATCH 27/47] block: introduce mirror job List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig64DAA7AB7D9215134593109A Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/24/2012 05:04 AM, Paolo Bonzini wrote: > This patch adds the implementation of a new job that mirrors a disk to > a new image while letting the guest continue using the old image. > The target is treated as a "black box" and data is copied from the > source to the target in the background. This can be used for several > purposes, including storage migration, continuous replication, and > observation of the guest I/O in an external program. It is also a > first step in replacing the inefficient block migration code that is > part of QEMU. >=20 > The job is possibly never-ending, but it is logically structured into > +++ b/block/mirror.c > + > + /* 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, so that drive-reopen can be > + * used to pivot to the mirroring target. > + */ Stale comment - isn't it now 'block-job-complete' instead of 'drive-reope= n'? > +++ b/block_int.h > @@ -305,4 +305,24 @@ void stream_start(BlockDriverState *bs, BlockDrive= rState *base, > BlockDriverCompletionFunc *cb, > void *opaque, Error **errp); > =20 > +/** > + * mirror_start: > + * @bs: Block device to operate on. > + * @target: Block device to write to. > + * @speed: The maximum speed, in bytes per second, or 0 for unlimited.= > + * @mode: Whether to collapse all images in the chain to the target. > + * @cb: Completion function for the job. > + * @opaque: Opaque pointer value passed to @cb. > + * @errp: Error object. > + * > + * Start a mirroring operation on @bs. Clusters that are allocated > + * in @bs will be written to @bs until the job is canceled or I've messed you up - you've got 'canceled' and 'cancelled' in different comments within the same patch :) I've now reviewed the series up to this point, with no findings on the patches where I did not reply. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig64DAA7AB7D9215134593109A 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/ iQEcBAEBCAAGBQJQEHrzAAoJEKeha0olJ0NqQF8H/RKtQ464bX/Ux9HwbGglH14j 4pfbGk/v+CxcWGrRGUSrXNslTVqmplSnD/af8SbdQzK/iWonPDIhFO7alwMo37/g 3GszIgeaMKxdykEU94JZ8+tnfl4Lisob8aNYGRu/RBR/ayRE8j30zYvUerhJr04u 1Co2yHVM02+mUe/MiKvUR/rCWVRg0lY24ydOs5p+u8i/eswNuzf1Z9WbG0OGf+JD e5aYsl2CoCMhybrrUzVghUPZwG3w/e1hzaJ2qUxjNxnGaMjHTD5yTsfECofReeGy qN8KqAcitbXtGmIY1fbKRjtsw/aPXYgbaOgHcF9C7BgdWygk69jxZVc8s4uLNdw= =FG1C -----END PGP SIGNATURE----- --------------enig64DAA7AB7D9215134593109A--