From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTDRW-0005jc-0f for qemu-devel@nongnu.org; Thu, 27 Mar 2014 12:46:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTDRQ-0005hp-24 for qemu-devel@nongnu.org; Thu, 27 Mar 2014 12:46:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTDRP-0005hl-Pi for qemu-devel@nongnu.org; Thu, 27 Mar 2014 12:46:07 -0400 Message-ID: <533455CA.6010207@redhat.com> Date: Thu, 27 Mar 2014 10:46:02 -0600 From: Eric Blake MIME-Version: 1.0 References: <1395911388-31027-1-git-send-email-famz@redhat.com> <1395911388-31027-8-git-send-email-famz@redhat.com> In-Reply-To: <1395911388-31027-8-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="knhFBDr5sig7KndKmHhctnF5FHhghcErB" Subject: Re: [Qemu-devel] [PATCH v4 7/9] qmp: Add dirty-bitmap-enable and dirty-bitmap-disable 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) --knhFBDr5sig7KndKmHhctnF5FHhghcErB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/27/2014 03:09 AM, Fam Zheng wrote: > This allows to put the dirty bitmap into a disabled state where no more= > writes will be tracked. >=20 > It will be used before backup or writing to persistent file. Is it worth the add-bitmap command being able to add a bitmap in the disabled state to begin with? I'm trying to figure out if there is a race between creating a bitmap and disabling it that might matter to any control flow, where being able to create it disabled would break that rac= e. >=20 > Signed-off-by: Fam Zheng > --- > block.c | 15 +++++++++++++++ > blockdev.c | 44 +++++++++++++++++++++++++++++++++++++++++++= + > include/block/block.h | 2 ++ > qapi-schema.json | 32 ++++++++++++++++++++++++++++++++ > qmp-commands.hx | 10 ++++++++++ > 5 files changed, 103 insertions(+) >=20 > +++ b/qapi-schema.json > @@ -2254,6 +2254,38 @@ > 'data': { 'device': 'str', 'name': 'str' } } > =20 > ## > +# @dirty-bitmap-enable > +# > +# Enable a dirty bitmap on the device > +# > +# Setting granularity has no effect here. See my comments on 2/9 about how this looks odd. > +# > +# Returns: nothing on success > +# If @device is not a valid block device, DeviceNotFound > +# If @name is not found, GenericError with an explaining mess= age > +# > +# Since 2.1 > +## > +{'command': 'dirty-bitmap-enable', > + 'data': 'DirtyBitmap' } Is it worth consolidating this into one command with a 'bool' parameter that says whether to enable or disable, instead of two separate commands? Also, is there a counterpart query- command that I can use to see the current state of a named dirty bitmap and whether it is currently enabled, so that this isn't a write-only interface? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --knhFBDr5sig7KndKmHhctnF5FHhghcErB 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/ iQEcBAEBCAAGBQJTNFXKAAoJEKeha0olJ0NqWEUIAKEm2sBWPgetvuGKg3817czh EDpDDWiz5MLBK2VgzRo9tqx8NyYsuskA6TO9Ysjwccyy3jxsOlthTwKLFkSzh6UJ hhVfN+Ftj6Tz7jk8/nvYIlPvExypCxhBVwWu0lCJVFFDTfkoRQ0eI4zJSlJ8vK0n RQNAh+g+UFMALNPOKMlV/sWx+7EkjUCaWy8HcyyCSkeKfpJ07UqYkNhPhF5pqWa7 RJ8LtVl7aNBUCGjsSQYoifL+y3CUSyFk5K2apBffv6nuTyBBkvuzWigMT5I4HIZH AfiICY4htnGyQ1AVNS6IkfpvkVuN5WNzy9q76kOyeQkprjr3eunLSrdhcLzAnYw= =xpTn -----END PGP SIGNATURE----- --knhFBDr5sig7KndKmHhctnF5FHhghcErB--