From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcz0U-0006Km-B5 for qemu-devel@nongnu.org; Fri, 18 Sep 2015 12:59:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zcz0T-0003NS-7q for qemu-devel@nongnu.org; Fri, 18 Sep 2015 12:59:30 -0400 References: <1442589793-7105-1-git-send-email-mreitz@redhat.com> <1442589793-7105-15-git-send-email-mreitz@redhat.com> From: Eric Blake Message-ID: <55FC42E2.2020207@redhat.com> Date: Fri, 18 Sep 2015 10:59:14 -0600 MIME-Version: 1.0 In-Reply-To: <1442589793-7105-15-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lvbV6IijHUGkCNpxS8CuPLAssvL9t5wxL" Subject: Re: [Qemu-devel] [PATCH v5 14/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) --lvbV6IijHUGkCNpxS8CuPLAssvL9t5wxL Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/18/2015 09:22 AM, 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. >=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 > Reviewed-by: Eric Blake > Reviewed-by: Alberto Garcia Still holds, but... > +++ b/qmp-commands.hx > @@ -2481,8 +2481,8 @@ Each json-object contain the following: > - "wr_total_time_ns": total time spend on writes in nano-seconds (= json-int) > - "rd_total_time_ns": total time spend on reads in nano-seconds (j= son-int) > - "flush_total_time_ns": total time spend on cache flushes in nano= -seconds (json-int) > - - "wr_highest_offset": Highest offset of a sector written since th= e > - BlockDriverState has been opened (json-int)= > + - "wr_highest_offset": The offset after the greatest byte written = to the > + BlockDriverState since it has been opened (= json-int) =2E..someday, I'd really like to have this stat show as non-zero even whe= n first opening the device (before writing to it). Right now, you have no clue how full a backing device is prior to starting a block-commit; you have to start writing to it to get a feel for its current usage. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --lvbV6IijHUGkCNpxS8CuPLAssvL9t5wxL 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/ iQEcBAEBCAAGBQJV/ELjAAoJEKeha0olJ0NqVGcIAKAAcVgMRs7IxchZpC6nJuZP wmBIqXjdfSTn+H5/OykqDPsgZHYoZ7XPzK6zDKkIdokSRsV0WMPP6Uk5xyaAqMwm 3fxGksyVeHs2OtFnmWzXu4YXweMw3ptRi6C0xC/a7s7C5wIKbidIm5lSxBQHKdZM XSDJA0X44UTnJ4896TdyX5rVPf6pK7eXHt1Lv++VORGJrj+C5XpPjPs6K72HVAGj Yn+P6DxciSIOrona+dXTaAShRqkOutaGl1YQ90wPIAmy2+00jehoyTBJWvRx90Ks 22/dX1Ztvls5rKW1tTrSLniKS6Pgn4WxDpR/T+QC8EPT3tDxD03tA9i70nxrQlk= =26ht -----END PGP SIGNATURE----- --lvbV6IijHUGkCNpxS8CuPLAssvL9t5wxL--