From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:59322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm7N4-00064n-Ii for qemu-devel@nongnu.org; Fri, 21 Dec 2012 13:31:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tm7My-0005ud-HX for qemu-devel@nongnu.org; Fri, 21 Dec 2012 13:30:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41004) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm7My-0005uE-AU for qemu-devel@nongnu.org; Fri, 21 Dec 2012 13:30:52 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qBLIUlfQ007522 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 21 Dec 2012 13:30:51 -0500 Message-ID: <50D4AAD1.9040102@redhat.com> Date: Fri, 21 Dec 2012 11:30:41 -0700 From: Eric Blake MIME-Version: 1.0 References: <1355319999-30627-1-git-send-email-pbonzini@redhat.com> <1355319999-30627-21-git-send-email-pbonzini@redhat.com> In-Reply-To: <1355319999-30627-21-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig38AC8585EDE560DA040B0E72" Subject: Re: [Qemu-devel] [PATCH 20/20] monitor: add commands to start/stop dirty bitmap List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig38AC8585EDE560DA040B0E72 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 12/12/2012 06:46 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > blockdev.c | 55 +++++++++++++++++++++++++++++++++++++++++++++++ > blockdev.h | 1 + > hmp-commands.hx | 39 ++++++++++++++++++++++++++++++++++ > hmp.c | 27 +++++++++++++++++++++++ > hmp.h | 2 ++ > qapi-schema.json | 56 ++++++++++++++++++++++++++++++++++++++++++++++++= > qmp-commands.hx | 65 ++++++++++++++++++++++++++++++++++++++++++++++++= ++++++++ > 7 files changed, 245 insertions(+) >=20 A bit light on the commit message. What is the proper sequence of QMP commands for using this feature in relation to driver-mirror and such? For example, let's say I want to start a mirror, then shutdown qemu, then start a new qemu -S; what is the right sequence for when to call this to re-initialize the dirty bitmap and resume the mirror at the same point, all prior to issuing 'cont' to the new qemu instance? Once I know that, then I can fix libvirt to allow disk-copy across qemu restarts (right now, libvirt limits disk-copy to transient domains, since those don't have to worry about restarts). > +If the dirty bitmap is already active, or used by something else (for > +example @command{drive_mirror}), the granularity argument must be abse= nt > +or equal to the active granularity. The granularity must be a power-o= f-two > +comprised between 4,096 and 67,108,864. 4k to 64M here... > +++ b/qapi-schema.json > @@ -3028,3 +3028,59 @@ > # Since: 1.3.0 > ## > { 'command': 'nbd-server-stop' } > + > +## > +# @blockdev-dirty-enable: > +# > +# @granularity: #optional granularity of the dirty bitmap, default is = 64K > +# if the image format doesn't have clusters, 4K if the c= lusters > +# are smaller than that, else the cluster size. Must be= a > +# power of 2 between 512 and 64M. but 512 here. Which is right? > +# > +# Returns: Nothing on success > +# > +# Since: 1.3 1.4, now > +## > +{ 'command': 'blockdev-dirty-enable', > + 'data': {'device': 'str', 'filename': 'str', '*granularity': 'uint32= ' } } > + > +## > +# @blockdev-dirty-disable: > +# > +# Stop tracking dirty blocks for a block device. Dirty blocks will > +# be written to an on-disk file, with one bit per block and an arbitra= ry > +# granularity. > +# > +# If the dirty bitmap is already active, or used by something else (fo= r > +# example blockdev-drive-mirror), the granularity argument must be abs= ent You named it 'drive-mirror', not 'blockdev-drive-mirror'. > +# or equal to the active granularity. > +# > +# @device: the name of the device to track dirty blocks of > +# > +# @force: #optional true to immediately stop writing to the dirty > +# bitmap file; false to do so only when the last user of the > +# dirty bitmap stops using it (default false) > +# > +# Returns: Nothing on success > +# > +# Since: 1.3 Again, 1.4. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enig38AC8585EDE560DA040B0E72 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.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with undefined - http://www.enigmail.net/ iQEcBAEBCAAGBQJQ1KrRAAoJEKeha0olJ0NqpG8IAJgQ3arQJF22hU87sWhS1+Qq ySPnTMxRH78JldBUTYpkOmcyFBM759VTBvIyyGxqqd4nbLyVu4Zps0r1FnapjS87 j6rc/LJoG4SOHGjwJpPEUxTOnqDuzC7iHxutNlgyz99xwoFA0yg7gQya/MgKnujy /Bt/uGA7/aCi5Jp/gqHU6GYOGXlngcAhkmtaWk+v95eqviVWiK5sMd6tr+v6NuCX U3fn95M0zmZT6Unaa8/H3QrbkvX1/cJNU7Cj/5vwjx//OnR4j/4psakINuSTlOdO znoY27T1uAlcVaaUd8krzrk9RFZWSvwU+hF9AocmOsFxkVtrw90pOCVYu9ROWwU= =sp/N -----END PGP SIGNATURE----- --------------enig38AC8585EDE560DA040B0E72--