From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YjFyk-0002fJ-QY for qemu-devel@nongnu.org; Fri, 17 Apr 2015 19:47:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YjFyh-0004Ug-Lw for qemu-devel@nongnu.org; Fri, 17 Apr 2015 19:47:22 -0400 Message-ID: <55318E5C.4040602@redhat.com> Date: Fri, 17 Apr 2015 16:51:08 -0600 From: Eric Blake MIME-Version: 1.0 References: <1428531604-9428-1-git-send-email-jsnow@redhat.com> <1428531604-9428-11-git-send-email-jsnow@redhat.com> In-Reply-To: <1428531604-9428-11-git-send-email-jsnow@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4dE5d2mwGjuJsqaAUTkD1CfP9nw69D1J6" Subject: Re: [Qemu-devel] [PATCH v5 10/21] qmp: Add support of "dirty-bitmap" sync mode for drive-backup List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , qemu-block@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, vsementsov@parallels.com, stefanha@redhat.com, mreitz@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --4dE5d2mwGjuJsqaAUTkD1CfP9nw69D1J6 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/08/2015 04:19 PM, John Snow wrote: > For "dirty-bitmap" sync mode, the block job will iterate through the > given dirty bitmap to decide if a sector needs backup (backup all the > dirty clusters and skip clean ones), just as allocation conditions of > "top" sync mode. >=20 > Signed-off-by: Fam Zheng > Signed-off-by: John Snow > --- > block.c | 9 +++ > block/backup.c | 156 ++++++++++++++++++++++++++++++++++++++= +------- > block/mirror.c | 4 ++ > blockdev.c | 18 +++++- > hmp.c | 3 +- > include/block/block.h | 1 + > include/block/block_int.h | 2 + > qapi/block-core.json | 13 ++-- > qmp-commands.hx | 7 ++- > 9 files changed, 180 insertions(+), 33 deletions(-) >=20 Just reviewing the interface... > +++ b/qapi/block-core.json > @@ -512,10 +512,12 @@ > # > # @none: only copy data written from now on > # > +# @dirty-bitmap: only copy data described by the dirty bitmap. Since: = 2.4 > +# > # Since: 1.3 > ## > { 'enum': 'MirrorSyncMode', > - 'data': ['top', 'full', 'none'] } > + 'data': ['top', 'full', 'none', 'dirty-bitmap'] } > =20 > ## > # @BlockJobType: > @@ -690,14 +692,17 @@ > # 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). > +# (all the disk, only the sectors allocated in the topmost imag= e, from a > +# dirty bitmap, or only new I/O). > # > # @mode: #optional whether and how QEMU should create a new image, def= ault is > # 'absolute-paths'. > # > # @speed: #optional the maximum speed, in bytes per second > # > +# @bitmap: #optional the name of dirty bitmap if sync is "dirty-bitmap= " > +# (Since 2.4) > +# > # @on-source-error: #optional the action to take on an error on the so= urce, > # default 'report'. 'stop' and 'enospc' can only be= used > # if the block device supports io-status (see BlockI= nfo). > @@ -715,7 +720,7 @@ > { 'type': 'DriveBackup', > 'data': { 'device': 'str', 'target': 'str', '*format': 'str', > 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode', > - '*speed': 'int', > + '*speed': 'int', '*bitmap': 'str', Looks okay. Is it an error if bitmap is supplied, but mode is not dirty-bitmap? Likewise, if mode is dirty-bitmap but bitmap is not suppli= ed? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --4dE5d2mwGjuJsqaAUTkD1CfP9nw69D1J6 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVMY5cAAoJEKeha0olJ0NqAJoIAI8OO839GYbaw494okwYLmIi sIxTcCQLaqzbrGJai6FMY4fyVPg6bmsNpPOZNwGz9A25oPWNeAfuoJD3Gg5Y6S5T C/ykwEL29Vy5lqxUOCDWzRDdMl41MsC2Dw3xuU6kykGJLBqskXlQ2qgVIaC7RZmR Pt3qyvrzKRAAwmDAhdQcChpi4/7XFFBykKTMCIdv+vAxxGbTQVqIc0tA4kQBPTbr G1KAC3qpoN4vgM2erlfavpG7wY8vMkq3bVr1Z7Ea57Q29ZCjGxzl6Q/rO4v+Uv7u REPVmyREZYJaAQhye01X/FccTJj5ft0cy3b5PnCcGJM+1Gk5jk7tnK1s43ZzY1g= =6wXt -----END PGP SIGNATURE----- --4dE5d2mwGjuJsqaAUTkD1CfP9nw69D1J6--