From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ze3Pk-00082q-W5 for qemu-devel@nongnu.org; Mon, 21 Sep 2015 11:54:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ze3Pk-00033z-1p for qemu-devel@nongnu.org; Mon, 21 Sep 2015 11:54:00 -0400 References: <1442589793-7105-1-git-send-email-mreitz@redhat.com> <1442589793-7105-15-git-send-email-mreitz@redhat.com> <55FC42E2.2020207@redhat.com> <20150921075721.GA3518@noname.redhat.com> From: Eric Blake Message-ID: <5600280F.4050009@redhat.com> Date: Mon, 21 Sep 2015 09:53:51 -0600 MIME-Version: 1.0 In-Reply-To: <20150921075721.GA3518@noname.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="R7ECJLeDkb96km0ejXj73aeOFkCxK7bJF" 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: Kevin Wolf Cc: Alberto Garcia , qemu-block@nongnu.org, Markus Armbruster , qemu-devel@nongnu.org, Stefan Hajnoczi , Max Reitz , John Snow This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --R7ECJLeDkb96km0ejXj73aeOFkCxK7bJF Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/21/2015 01:57 AM, Kevin Wolf wrote: >>> + - "wr_highest_offset": The offset after the greatest byte writte= n to the >>> + BlockDriverState since it has been opened= (json-int) >> >> ...someday, I'd really like to have this stat show as non-zero even wh= en >> first opening the device (before writing to it). Right now, you have n= o >> clue how full a backing device is prior to starting a block-commit; yo= u >> have to start writing to it to get a feel for its current usage. >=20 > With which value would it start? You don't want the file/device size > because for block devices that's more than is actually used yet. >=20 > What you really want to know is a number for the parent node, which > isn't readily available for qcow2 (you would have to scan the refcounts= > in the last refcount block on startup) and doesn't really exist for mos= t > other formats (very few of them can be used on block devices, most rely= > on the file size). Libvirt only uses the stat on qcow2 format atop block devices, and uses it precisely because that is the one place where relying on device size is wrong. And yes, it really WOULD be nice for the value to read the last refcount block on startup, as that IS the correct value. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --R7ECJLeDkb96km0ejXj73aeOFkCxK7bJF 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/ iQEcBAEBCAAGBQJWACgPAAoJEKeha0olJ0NqLGYIAIIKZc7fFFSEM16W1UV8hXel 8KNhBfaujhOgb8H0JkW8iRyIMcUARZTwo6ghgni44XB3UxQ/L7FzPK9iuxWQZpZC H/D/XRGbmQ8anibKiveQYcBtUYvnOWQseWcde0PkEiDycX3i97UyrYh6vqxTrZKF NRMQ9vA39H1xg2iDiDL71Abj9icOqmLOtKIERUvrI4tFuq5EgpgpHcq3lj9Q0WF7 l+WDfs7R7/Sip/S86mljxDmf7RRzuzw0/a8E8f+iDROwYgYmVjoaedGsIPZQLc7Z YDql/482Q2O+55u+1EttElnZjf2PiGknXsoPE8bIvcAZPOW0x3qhTdE6pErhiiE= =fGL+ -----END PGP SIGNATURE----- --R7ECJLeDkb96km0ejXj73aeOFkCxK7bJF--