From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yl2yB-0005UK-Rj for qemu-devel@nongnu.org; Wed, 22 Apr 2015 18:18:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yl2yA-0007yd-RK for qemu-devel@nongnu.org; Wed, 22 Apr 2015 18:18:11 -0400 Message-ID: <55381E1B.1060507@redhat.com> Date: Wed, 22 Apr 2015 16:18:03 -0600 From: Eric Blake MIME-Version: 1.0 References: <1429314609-29776-1-git-send-email-jsnow@redhat.com> <1429314609-29776-13-git-send-email-jsnow@redhat.com> In-Reply-To: <1429314609-29776-13-git-send-email-jsnow@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oaFIWTDwTWVjP90dTd0Jsj5txocdgPmD4" Subject: Re: [Qemu-devel] [PATCH v6 12/21] qmp: Add dirty bitmap status field in query-block 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) --oaFIWTDwTWVjP90dTd0Jsj5txocdgPmD4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/17/2015 05:50 PM, John Snow wrote: > Add the "frozen" status booleans, to inform clients > when a bitmap is occupied doing a task. >=20 > Signed-off-by: Fam Zheng > Signed-off-by: John Snow > Reviewed-by: Max Reitz > Reviewed-by: Stefan Hajnoczi > Reviewed-by: Eric Blake > --- > block.c | 1 + > qapi/block-core.json | 5 ++++- > 2 files changed, 5 insertions(+), 1 deletion(-) > +++ b/qapi/block-core.json > @@ -336,10 +336,13 @@ > # > # @granularity: granularity of the dirty bitmap in bytes (since 1.4) > # > +# @frozen: whether the dirty bitmap is frozen (Since 2.4) > +# > # Since: 1.3 > ## > { 'type': 'BlockDirtyInfo', > - 'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32'} } > + 'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32', > + 'frozen': 'bool'} } Just thinking aloud here - internally, we have a tri-state situation (enabled, disabled, or frozen). I know we aren't exposing disabled to the end user yet (no use case for that), but would it be better to make this output an enum type (two values for now, 'enabled' and 'frozen') to make it easier to add a third value later, without having to add yet another boolean? But it's not the end of the world to expose a single boolean now (we'd just have to maintain it forever, even if we add later states), and adding an enum now just adds complexity that we may not need, so: Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --oaFIWTDwTWVjP90dTd0Jsj5txocdgPmD4 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/ iQEcBAEBCAAGBQJVOB4bAAoJEKeha0olJ0NqMXMIAJzCOxvJWNrAhtaYSMM7b6Sc 3RQVrDIe8D8IykXZolO3WIOBLTQ9zl8JBjKye+rDlzgR747N8R9gjW2tUE54GZ/L Vd+mY6i6S9BpjV0n/zswNYquvG6NDJrbRTPqvV8RIK7tbAdat5Zl1SZK29+YWCba ZsYZ/G4P/BQwIMo4B5J/JCJrPxmqdXYKdfOB+sS6lii81fuQH5AMsXJ9aKHpFkJg eQYOY1XBCvqWZXiELNjf5FRfEcXRBai3hBM+OVvc2nryg7tQ0V/JBRgvOUh4ZCl1 48/1+WfA4+ZCO7ZT7gHMFw7WFHqRAXM6we+JdGhQbWPtJWGjZOWC2kVIlcy1lUM= =FNLv -----END PGP SIGNATURE----- --oaFIWTDwTWVjP90dTd0Jsj5txocdgPmD4--