From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60465) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwvQZ-0004S5-G6 for qemu-devel@nongnu.org; Wed, 10 Jul 2013 10:31:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UwvQX-0002hM-QM for qemu-devel@nongnu.org; Wed, 10 Jul 2013 10:31:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UwvQX-0002hD-Ik for qemu-devel@nongnu.org; Wed, 10 Jul 2013 10:31:29 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r6AEVSDB019206 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Jul 2013 10:31:28 -0400 Message-ID: <51DD703D.1060602@redhat.com> Date: Wed, 10 Jul 2013 08:31:25 -0600 From: Eric Blake MIME-Version: 1.0 References: <1372248718-27953-1-git-send-email-stefanha@redhat.com> <1372248718-27953-2-git-send-email-stefanha@redhat.com> In-Reply-To: <1372248718-27953-2-git-send-email-stefanha@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2RXMJTUNBBOGFULWGMHUM" Subject: Re: [Qemu-devel] [PATCH v2 1/2] blockdev: add sync mode to drive-backup QMP command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Paolo Bonzini , imain@redhat.com, Fam Zheng , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2RXMJTUNBBOGFULWGMHUM Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/26/2013 06:11 AM, Stefan Hajnoczi wrote: > The drive-backup command is similar to the drive-mirror command, except= > no guest data written after the command executes gets copied. Add a > sync mode argument which determines whether the entire disk is copied, > just allocated clusters, or only clusters being written to by the guest= =2E >=20 > Currently only sync mode 'full' is supported - it copies the entire dis= k. > For read-only point-in-time snapshots we may only need sync mode 'none'= > since the target can be a qcow2 file using the guest's disk as its > backing file (no need to copy the entire disk). Finally, sync mode > 'top' is useful if we wish to preserve the backing chain. >=20 > Note that this patch just adds the sync mode argument to drive-backup. > It does not implement sync modes 'top' or 'none'. This patch is > necessary so we can add a drive-backup HMP command that behaves like th= e > existing drive-mirror HMP command and takes a sync mode. >=20 > Signed-off-by: Stefan Hajnoczi > --- > +++ b/qapi-schema.json > @@ -1626,6 +1626,10 @@ > # @format: #optional the format of the new destination, default is to > # probe if @mode is 'existing', else the format of the source= > # > +# @sync: what parts of the disk image should be copied to the destinat= ion > +# (all the disk, only the sectors allocated in the topmost imag= e, or > +# only new I/O). > +# > # @mode: #optional whether and how QEMU should create a new image, def= ault is > # 'absolute-paths'. > # > @@ -1647,7 +1651,8 @@ > ## > { 'type': 'DriveBackup', > 'data': { 'device': 'str', 'target': 'str', '*format': 'str', > - '*mode': 'NewImageMode', '*speed': 'int', > + 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode', Making it mandatory is fine, since the command is new to 1.6 (if this were after 1.6, we'd have to make it optional). > # > +# @sync: what parts of the disk image should be copied to the destinat= ion > +# (all the disk, only the sectors allocated in the topmost imag= e, or > +# only new I/O). This duplication will conflict with Kevin's patch currently on the qmp queue for 'qapi-schema: Use existing type for drive-backup arguments'; you may want to coordinate which series gets merged first, and rebase the other one appropriately. If you do rebase, feel free to add: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2RXMJTUNBBOGFULWGMHUM 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.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJR3XA9AAoJEKeha0olJ0Nqm6oH/0NtBvoZ7AqZQUdfn7Mtpudt ouwfdCRv29B59WYcXLTZmtADnPA22hNMHBXgFqaP7f7gPWZOFVK8H6Lam4N7/BHi v4jEKIbWGGLSZ6S3tPfKxaqkP1pMjz0o3VOFudRC+yd8K5qq1fnqjQeNuzRFuyDR 4Sy4bT/brwWHTWVFbdLafBPm1G+8hKkz6iZYkPv4sVaPoHD09c6Lsndk66MZpg4h XCpqp0UV0wxTqF9E6vQKvosT59VgSiVMDVJKg8Sw4AgrXy0QOzX861GSepvvucts B0pfbxwgIVhwZCOzxRdHZVD+DE/mISDu7LNuQ+91eGbuz7pIAaw89d7WUu9NYns= =gOAC -----END PGP SIGNATURE----- ------enig2RXMJTUNBBOGFULWGMHUM--