From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTDNK-0002vZ-EQ for qemu-devel@nongnu.org; Thu, 27 Mar 2014 12:41:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTDNF-0004CN-Jc for qemu-devel@nongnu.org; Thu, 27 Mar 2014 12:41:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45955) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTDNF-0004CJ-B2 for qemu-devel@nongnu.org; Thu, 27 Mar 2014 12:41:49 -0400 Message-ID: <533454C9.1000102@redhat.com> Date: Thu, 27 Mar 2014 10:41:45 -0600 From: Eric Blake MIME-Version: 1.0 References: <1395911388-31027-1-git-send-email-famz@redhat.com> <1395911388-31027-3-git-send-email-famz@redhat.com> In-Reply-To: <1395911388-31027-3-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8L0OKBOXbXllWFr0MXdSuKCipernF1OTk" Subject: Re: [Qemu-devel] [PATCH v4 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini , Benoit Canet , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --8L0OKBOXbXllWFr0MXdSuKCipernF1OTk Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/27/2014 03:09 AM, Fam Zheng wrote: > The new command pair is added to manage user created dirty bitmap. The > dirty bitmap's name is mandatory and must be unique for the same device= , > but different devices can have bitmaps with the same names. >=20 > Signed-off-by: Fam Zheng > --- > +++ b/qapi-schema.json > @@ -2209,6 +2209,51 @@ > '*on-target-error': 'BlockdevOnError' } } > =20 > ## > +# @DirtyBitmap > +# > +# @device: name of device which the bitmap is tracking > +# > +# @name: name of the dirty bitmap > +# > +# @granularity: #optional the bitmap granularity, default is 64k for > +# dirty-bitmap-add Optional, but only affects dirty-bitmap-add. You later document... > +# @dirty-bitmap-remove > +# > +# Remove a dirty bitmap on the device > +# > +# Setting granularity has no effect here. =2E..that it is silently ignored where it can't be used here, and again i= n 7/9 for both dirty-bitmap-disable and dirty-bitmap-enable. I think it would be smarter to do: { 'type': 'DirtyBitmap', 'data': { 'device': 'str', 'name': 'str' } } {'command': 'dirty-bitmap-add', 'data': { 'map': 'DirtyBitmap', '*granularity': 'int' } } Or: { 'type': 'DirtyBitmap', 'data': { 'device': 'str', 'name': 'str' } } { 'type': 'DirtyBitmapGranularity', 'base': 'DirtyBitmap', 'data': { '*granularity': 'int' } } {'command': 'dirty-bitmap-add', 'data': 'DirtyBitmapGranularity' } which says that the 'DirtyBitmap' struct has no optional members, and instead of silently ignoring an optional member in 3 commands, we instead write the one command that takes the optional argument when we actually care about it. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --8L0OKBOXbXllWFr0MXdSuKCipernF1OTk 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTNFTJAAoJEKeha0olJ0NqkK0H/i01ZIHbtV0PJzXjnumJlyh2 BWYOEo0/SCHFQGVah8HtJ/EomJuC3xZKmbhH3mUsj/p8HHS5xM6k6pvyXj1WYfe2 AnLByl1JZ14c0iveMnzBVtfant9rJB/QhxoloPFuidGsekPDCmUJztUruHWxbKch ZTHvpxBONbAuMEN50EJdG3gLCHlkyKylYozSuCKHcNAeM9VbQiZ2A6btHsxZrG29 yjSQLwRYrmk1ziq6PoCjLAy1uMU32UM2NqAQ1k1WxBa3f4o9Mh5cAlM/xyjDZbZU RF1YPbbZpS6JOVJfAmZz1fGUNynphFWCnjI+OjchcEYBUodSRigo7+WPvvwRhtU= =98Jw -----END PGP SIGNATURE----- --8L0OKBOXbXllWFr0MXdSuKCipernF1OTk--