From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33379) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMgfr-0005Jj-Qh for qemu-devel@nongnu.org; Fri, 22 Jan 2016 13:43:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMgfn-00073d-PU for qemu-devel@nongnu.org; Fri, 22 Jan 2016 13:43:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMgfn-00073W-I3 for qemu-devel@nongnu.org; Fri, 22 Jan 2016 13:43:03 -0500 References: <1453482459-80179-1-git-send-email-vsementsov@virtuozzo.com> <1453482459-80179-2-git-send-email-vsementsov@virtuozzo.com> From: Eric Blake Message-ID: <56A27834.9060609@redhat.com> Date: Fri, 22 Jan 2016 11:43:00 -0700 MIME-Version: 1.0 In-Reply-To: <1453482459-80179-2-git-send-email-vsementsov@virtuozzo.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cwL1Ss4xkCNfHecBOkA0TDgfA1phWWlBi" Subject: Re: [Qemu-devel] [PATCH] qmp: add query-block-dirty-bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Sementsov-Ogievskiy , qemu-devel@nongnu.org Cc: jsnow@redhat.com, famz@redhat.com, den@virtuozzo.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --cwL1Ss4xkCNfHecBOkA0TDgfA1phWWlBi Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/22/2016 10:07 AM, Vladimir Sementsov-Ogievskiy wrote: > Add qmp command to query dirty bitmap. This is needed for external > backup. >=20 > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > block.c | 41 ++++++++++++++++++++++++++++++++++++++++ > blockdev.c | 21 +++++++++++++++++++++ > include/block/block.h | 2 ++ > qapi/block-core.json | 52 +++++++++++++++++++++++++++++++++++++++++++= ++++++++ > qmp-commands.hx | 22 ++++++++++++++++++++++ > 5 files changed, 138 insertions(+) Just an interface review at this time: > +++ b/qapi/block-core.json > @@ -414,6 +414,58 @@ > ## > { 'command': 'query-block', 'returns': ['BlockInfo'] } > =20 > +## > +# @BlockDirtyRegion: > +# > +# Region in bytes. > +# > +# @start: first byte > +# > +# @count: number of bytes in the region > +# > +# Since: 2.3 Don't you mean 2.6? > +## > +{ 'struct': 'BlockDirtyRegion', > + 'data': { 'start': 'int', 'count': 'int' } } > + > +## > +# @BlockDirtyBitmapInfo > +# > +# @name: the name of the dirty bitmap > +# > +# @size: size of the dirty bitmap in sectors > +# > +# @granularity: granularity of the dirty bitmap in bytes > +# > +# @disabled: whether the dirty bitmap is disabled > +# > +# @dirty-count: number of dirty bytes according to the dirty bitmap > +# > +# @dirty-regions: dirty regions of the bitmap > +# > +# Since 2.3 and again > +## > +{ 'struct': 'BlockDirtyBitmapInfo', > + 'data': { 'name': 'str', > + 'size': 'int', > + 'granularity': 'int', > + 'disabled': 'bool', > + 'dirty-count': 'int', > + 'dirty-regions': ['BlockDirtyRegion'] } } > + > +## > +# @query-block-dirty-bitmap > +# > +# Get a description for specified dirty bitmap including it's dirty re= gions. > +# This command is in general for testing purposes. > +# > +# Returns: @BlockDirtyBitmapInfo > +# > +# Since: 2.3 and again > +## > +{ 'command': 'query-block-dirty-bitmap', > + 'data': 'BlockDirtyBitmap', > + 'returns': 'BlockDirtyBitmapInfo' } Seems reasonable for getting at the information for one bitmap. But would it be smarter to have: { 'command': 'query-block-dirty-bitmap', 'data': { 'node':'str', '*name':'str' }, 'returns': [ 'BlockDirtyBitmapInfo' ] } so that you could get ALL the dirty bitmaps for a single node (with optional filtering to get an array of just one, if 'name' was provided)? Or, should BlockDirtyBitmapInfo also include a node name, then you could query all dirty bitmaps for all nodes at once? Is that too much data for one QMP command? > + > +query-block-dirty-bitmap > +------------------------ > +Since 2.6 > + > +Get dirty bitmap info, including contents. Bitmap data are returned as= array of > +dirty regions > + > +Arguments: > + > +- "node": device/node on which to remove dirty bitmap (json-string) Too much copy-and-paste; you aren't removing the bitmap. > +- "name": name of the dirty bitmap to remove (json-string) > + > +EQMP Worth showing example output? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --cwL1Ss4xkCNfHecBOkA0TDgfA1phWWlBi 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/ iQEcBAEBCAAGBQJWong0AAoJEKeha0olJ0NqsBIH/3qu2XspTgg83BF/JBG2G+zk /p7xnuNpuBYcPH6RPwiSZxPT+m3qS6McocDu+9uRjVEtGpDxrgdoaLBdy6+8YoUl OKBN3+hwssu1D6+uftoZLaUWVxHHwjelvA6dCFhjyVTeYFUESFHEpZhGpv1BEiNu OivHDwbxqb3Y48n9EgXYaq1NCOwuB08QdrmlfvqC+MaghpBxJ1g33y5aFGXSc4u7 Yh/h54oHI3G7KcMR/Xoluz+V+nce6k3TBHpCwWXw1YL8cuiHm1jw1yzJvFZiYPd7 Y9Mj6EPur6eUC+nStBS1KOZwbOU2LFqtO2Po3kb3f9VOK9fX4UQwm3R1FlaGYgU= =i5dF -----END PGP SIGNATURE----- --cwL1Ss4xkCNfHecBOkA0TDgfA1phWWlBi--