[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v5 14/38] block: Remove wr_highest_sector from B

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v5 14/38] block: Remove wr_highest_sector from BlockAcctStats
Date: Mon, 21 Sep 2015 09:53:51 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 09/21/2015 01:57 AM, Kevin Wolf wrote:

>>> +    - "wr_highest_offset": The offset after the greatest byte written to 
>>> the
>>> +                           BlockDriverState since it has been opened 
>>> (json-int)
>> ...someday, I'd really like to have this stat show as non-zero even when
>> 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.
> 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.
> 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 most
> 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.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]