From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53137) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0FZa-0005Jp-2T for qemu-devel@nongnu.org; Wed, 03 Jun 2015 16:47:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0FZY-0007Rk-Hc for qemu-devel@nongnu.org; Wed, 03 Jun 2015 16:47:38 -0400 Message-ID: <556F67E1.7030808@redhat.com> Date: Wed, 03 Jun 2015 14:47:29 -0600 From: Eric Blake MIME-Version: 1.0 References: <1433360659-1915-1-git-send-email-mreitz@redhat.com> <1433360659-1915-14-git-send-email-mreitz@redhat.com> In-Reply-To: <1433360659-1915-14-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TBmAoBaxJphu58bxstSMv67I427tKBBWE" Subject: Re: [Qemu-devel] [PATCH v3 13/38] block: Remove wr_highest_sector from BlockAcctStats List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , Alberto Garcia , qemu-devel@nongnu.org, Markus Armbruster , Stefan Hajnoczi , John Snow This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TBmAoBaxJphu58bxstSMv67I427tKBBWE Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/03/2015 01:43 PM, Max Reitz wrote: > BlockAcctStats contains statistics about the data transferred from and > to the device; wr_highest_sector does not fit in with the rest. >=20 > Furthermore, those statistics are supposed to be specific for a certain= > device and not necessarily for a BDS (see the comment above > bdrv_get_stats()); on the other hand, wr_highest_sector may be a rather= > important information to know for each BDS. When BlockAcctStats is > finally removed from the BDS, we will want to keep wr_highest_sector in= > the BDS. See also Berto's thread on I/O accounting overhaul: https://lists.gnu.org/archive/html/qemu-devel/2015-06/msg00994.html I think eventually we want stats at both BDS and BB levels. But for now, you are must moving things around to where they make sense, so I can live with it as incremental improvement. >=20 > Finally, wr_highest_sector is renamed to wr_highest_offset and given th= e > appropriate meaning. Externally, it is represented as an offset so ther= e > is no point in doing something different internally. Its definition is > changed to match that in qapi/block-core.json which is "the offset afte= r > the greatest byte written to". Doing so should not cause any harm since= > if external programs tried to calculate the volume usage by > (wr_highest_offset + 512) / volume_size, after this patch they will jus= t > assume the volume to be full slightly earlier than before. >=20 > Signed-off-by: Max Reitz > --- > block/accounting.c | 8 -------- > block/io.c | 4 +++- > block/qapi.c | 4 ++-- > include/block/accounting.h | 3 --- > include/block/block_int.h | 3 +++ > qmp-commands.hx | 4 ++-- > 6 files changed, 10 insertions(+), 16 deletions(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --TBmAoBaxJphu58bxstSMv67I427tKBBWE 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/ iQEcBAEBCAAGBQJVb2fhAAoJEKeha0olJ0NqOMgH/Ahx+EE5W2L88phIuGI4ysvi EsQnto4tuORKusXDEAi+3jmBHj7YFqwHfkBTVd6ArWafvcj3/xYpd91dt15sHqgT e1bSHEl03O0hOWVSBH6yt/NAUE1K0kYDRti6LoXU2AqsiJkK0rowv70vJymOrTy6 WNsDaLA3Hm+dpiLAHnUJqTyPAN0MWSoWsTJWdQQAHizA6SUj0qMYE0Nji07q5Qfb 0tiCP5DnSuNt8IxFYWTmvqD4zK0JpUPd0+5L9tbH8kapEWAQt/7mAfJ2HkQi/5Zn nehmMl28iHA0E/VlQiCeGOi7k6E5e0rRfnQot8ACdiTMdxOfEsI8kUShGazOjrU= =s8Vl -----END PGP SIGNATURE----- --TBmAoBaxJphu58bxstSMv67I427tKBBWE--