From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53648) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4zXD-0006PF-6b for qemu-devel@nongnu.org; Wed, 09 Jul 2014 17:36:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4zX7-0004wO-SI for qemu-devel@nongnu.org; Wed, 09 Jul 2014 17:36:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4zX7-0004wA-Jm for qemu-devel@nongnu.org; Wed, 09 Jul 2014 17:36:09 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s69La8Qg026148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 9 Jul 2014 17:36:08 -0400 Message-ID: <53BDB5C7.30104@redhat.com> Date: Wed, 09 Jul 2014 15:36:07 -0600 From: Eric Blake MIME-Version: 1.0 References: <1404582448-23840-1-git-send-email-mreitz@redhat.com> <1404582448-23840-7-git-send-email-mreitz@redhat.com> <53BAF165.3090702@redhat.com> <53BDB303.3030601@redhat.com> In-Reply-To: <53BDB303.3030601@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="gVNbfqUrjuuS0MOBgFdCX7VOVXCRs751V" Subject: Re: [Qemu-devel] [PATCH v9 06/14] block/mirror: Improve progress report List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --gVNbfqUrjuuS0MOBgFdCX7VOVXCRs751V Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/09/2014 03:24 PM, Paolo Bonzini wrote: > Il 07/07/2014 21:13, Eric Blake ha scritto: >> On 07/05/2014 11:47 AM, Max Reitz wrote: >>> Instead of taking the total length of the block device as the block >>> job's length, use the number of dirty sectors. The progress is now th= e >>> number of sectors mirrored to the target block device. Note that this= >>> may result in the job's length increasing during operation, which is >>> however in fact desirable. >>> >>> Signed-off-by: Max Reitz >>> --- >>> block/mirror.c | 34 ++++++++++++++++++++++------------ >>> 1 file changed, 22 insertions(+), 12 deletions(-) >> >> Reviewed-by: Eric Blake >=20 > This is an API change... IIUC the length can become bigger than the > underlying device's size. Eric, how would libvirt expose this to > clients and what are the chances that they get confused? Libvirt has already documented that a job size is unrelated to the block device size, that it is only an approximation to completion, and that the completion number may change during operation. The only hard and fast rule is that the job is finished when the two counters are equal. I recommended this change precisely because the new semantics are better than the old, including how libvirt exposes the numbers to the end user - if the end parameter continues to grow more than the current parameter, it is DESIRABLE to expose that as sign that the guest is dirtying pages fast enough to cause problems in converging the block job.= http://libvirt.org/html/libvirt-libvirt.html#virDomainBlockJobInfo "The following fields provide an indication of block job progress. @cur indicates the current position and will be between 0 and @end. @end is the final cursor position for this operation and represents completion. To approximate progress, divide @cur by @end." --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --gVNbfqUrjuuS0MOBgFdCX7VOVXCRs751V 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/ iQEcBAEBCAAGBQJTvbXHAAoJEKeha0olJ0NqcGQH/2nAqr/RN2e+ESoL+O0nlYTi 6ZllZGNzE7MLCSZ3KPHC9Gf8hckhpXvj2HBQ6mAnhGcQ6+90SeB/gtNO6JTKni6J zVan4hz8V/Jgd5RivkViInK7oBm5v1GdcCI0eEFIo8LCxOJ9OxsJOO7JBVqg6Eh2 auch4NlKLC29zF9aFV3fw0cpVlvwnFU8kl+xvZxVemAEP/sClR2Ncn0bB7mun1gq Rm2c4/fgbweH2kH6+jNCV+TbpTYYLffGvFnv3TsC6iPqcwnwXyNgDYjP1mdk4aeD 6JnmcIqaEH3o/Wcaq8ORybQNuQRS7HCyjfg8ATe7sNTl3DuwA1voe6AjkT9Ir48= =rsNp -----END PGP SIGNATURE----- --gVNbfqUrjuuS0MOBgFdCX7VOVXCRs751V--