From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXZHS-0007sM-R0 for qemu-devel@nongnu.org; Tue, 08 Apr 2014 12:53:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXZHN-0004un-OB for qemu-devel@nongnu.org; Tue, 08 Apr 2014 12:53:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26822) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXZHN-0004uf-Ey for qemu-devel@nongnu.org; Tue, 08 Apr 2014 12:53:45 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s38Grifi017570 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 8 Apr 2014 12:53:44 -0400 Message-ID: <53442997.9040200@redhat.com> Date: Tue, 08 Apr 2014 10:53:43 -0600 From: Eric Blake MIME-Version: 1.0 References: <1396961442-24046-1-git-send-email-mreitz@redhat.com> <1396961442-24046-5-git-send-email-mreitz@redhat.com> <20140408153452.GF6262@noname.str.redhat.com> In-Reply-To: <20140408153452.GF6262@noname.str.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BnWgRWiOa1of1iuMUAVUdn1m8All1OBSU" Subject: Re: [Qemu-devel] [PATCH v2 4/6] qemu-img: Enable progress output for commit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , Max Reitz Cc: qemu-devel@nongnu.org, Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BnWgRWiOa1of1iuMUAVUdn1m8All1OBSU Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/08/2014 09:34 AM, Kevin Wolf wrote: > Am 08.04.2014 um 14:50 hat Max Reitz geschrieben: >> Implement progress output for the commit command by querying the >> progress of the block job. >> >> Signed-off-by: Max Reitz >> Reviewed-by: Eric Blake >> --- >> =20 >> info =3D block_job_query(job); >> =20 >> + if (info->offset) { >> + if (!mod_offset) { >=20 > On a fully populated image this doesn't look entirely right. I think th= e > first 2 MB (or whatever the buffer size is) will be disregarded in the > calculation, even though they are real work that is done. Is there any (easy) way to calculate how many dirty sectors remain to be committed, to use that rather than the image size as the job percentage remaining? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --BnWgRWiOa1of1iuMUAVUdn1m8All1OBSU 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/ iQEcBAEBCAAGBQJTRCmXAAoJEKeha0olJ0NqC4cH/RtJePQe8zoSEukHF7DcYr1j Sc58sTXaQ/ic+CMFMPm4ta4wTxw6iXQr21XDkfbQ3oebIOs5Ya+MWgJjJIt88LrJ Q3my2RbFvSCgnYBNp0AZqOgD665Zvmbdkc5G+Ocy12lByggvgtYpqUjKaJcd6KxZ e+Mf4tki7NyoWPJMVghcHAUnpyUWtY8m8Zw7hTnDm1PNsj23sV8i3yg6bqrq3r9d 9GyMcoQ9Z1c1I0sAPwI/JkYm//ZJl+RmIV4Ifg7yEY9RTWSF9f4YUsiFn/p9guKs XSKNxph+G/TkhLeo6tCqf8dq3FD6K0P9vlAJAFJM7/WOcjB+8CFXbjRKnikC8fw= =eb5P -----END PGP SIGNATURE----- --BnWgRWiOa1of1iuMUAVUdn1m8All1OBSU--