From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49011) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0qqA-0004LI-85 for qemu-devel@nongnu.org; Fri, 05 Jun 2015 08:35:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0qq9-0000oG-0B for qemu-devel@nongnu.org; Fri, 05 Jun 2015 08:35:14 -0400 Message-ID: <55719779.2080504@redhat.com> Date: Fri, 05 Jun 2015 06:35:05 -0600 From: Eric Blake MIME-Version: 1.0 References: <1433360659-1915-1-git-send-email-mreitz@redhat.com> <1433360659-1915-15-git-send-email-mreitz@redhat.com> <556F6912.9080101@redhat.com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="HRTk52UFMcHq5RJnpl5rCrXvxUjfkImtC" Subject: Re: [Qemu-devel] [PATCH v3 14/38] block: Move BlockAcctStats into BlockBackend List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , John Snow , qemu-devel@nongnu.org, Stefan Hajnoczi , Markus Armbruster This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --HRTk52UFMcHq5RJnpl5rCrXvxUjfkImtC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/05/2015 04:47 AM, Alberto Garcia wrote: > On Wed 03 Jun 2015 10:52:34 PM CEST, Eric Blake wrote: >=20 >>> As the comment above bdrv_get_stats() says, BlockAcctStats is >>> something which belongs to the device instead of each >>> BlockDriverState. This patch therefore moves it into the >>> BlockBackend. >> >> Again, Berto may want to eventually report stats for both BDS and BB, >> but that can come later. For now, this is reasonable refactoring. >=20 > Yeah, this change makes sense and I was actually planning to do > something similar in my patch series. >=20 > The only problem that I see with this is that the data is stored in the= > right place but the API is (still) wrong. query-blockstats queries BDSs= , > but the information we'll get in return it's either the stats from the > BlockBackend (for root nodes) or all zeroes (for the rest), not the > stats from the BDSs themselves. >=20 > Ideally we would need one way to query information from the BlockBacken= d > (that we already have) and another way to query information from the BD= S > (that we don't have yet). But I guess we have to look for a way to do > this without breaking the API compatibility. >=20 > And for the record, my priorities at the moment are the stats from the > BlockBackend, not the BDS. We already have: query-block - reports stats on BB query-blockstats - reports stats on BDS I don't know if it makes more sense to have a single shared struct that both calls can report, for the things that make sense in both places, but I also know that in my current efforts to add write-threshold support to libvirt, there were several stats that I wish were available from the opposite command of where it is currently found. Back-compat says it is okay to duplicate output in multiple locations, but not to completely move it from one to the other, although the effort of duplication may be a maintenance nightmare. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --HRTk52UFMcHq5RJnpl5rCrXvxUjfkImtC 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/ iQEcBAEBCAAGBQJVcZd5AAoJEKeha0olJ0NqvBcIAKK7/Iuz2I/UwGlIYO6ShvZk tEk6iGYW7MVJIlNanlYPzoiTy2mq15AeKjWE0sjjOuO2HzIO/lM2UMtOGgZucdZl D03gD20byPXgo/crYQn6Ypv1VFeVBYNyW7s8aGGaJkkWhGEzhgCoKvaEdgcJSWXA DUXm2OzgFP3Z36hmi6kJkOQPM+ALx9x5qrUMxce8u5W4U5Kxk9MWOVbe9ydt6K4y 7TDt3zniNZQzk37gm0ZyPQRKRgFLZM593x6aFzyad48S6Ng38dOeVIDAFE4doFJU h3nhY8YbHbx2Xbp7siSwcNtHRRktI7AnDaHf9k/6SWutVi3L0NVjlmH4XFITRPg= =6qOZ -----END PGP SIGNATURE----- --HRTk52UFMcHq5RJnpl5rCrXvxUjfkImtC--