[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
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v5 10/38] hw/block/fdc: Implement tray status, (continued)
- [Qemu-devel] [PATCH v5 10/38] hw/block/fdc: Implement tray status, Max Reitz, 2015/09/18
- [Qemu-devel] [PATCH v5 09/38] block: Invoke change media CB before NULLing drv, Max Reitz, 2015/09/18
- [Qemu-devel] [PATCH v5 11/38] hw/usb-storage: Check whether BB is inserted, Max Reitz, 2015/09/18
- [Qemu-devel] [PATCH v5 13/38] block: Move guest_block_size into BlockBackend, Max Reitz, 2015/09/18
- [Qemu-devel] [PATCH v5 12/38] block: Fix BB AIOCB AioContext without BDS, Max Reitz, 2015/09/18
- [Qemu-devel] [PATCH v5 14/38] block: Remove wr_highest_sector from BlockAcctStats, Max Reitz, 2015/09/18
- [Qemu-devel] [PATCH v5 15/38] block: Move BlockAcctStats into BlockBackend, Max Reitz, 2015/09/18
- [Qemu-devel] [PATCH v5 16/38] block: Move I/O status and error actions into BB, Max Reitz, 2015/09/18
- [Qemu-devel] [PATCH v5 17/38] block: Add BlockBackendRootState, Max Reitz, 2015/09/18
- [Qemu-devel] [PATCH v5 18/38] block: Make some BB functions fall back to BBRS, Max Reitz, 2015/09/18
- [Qemu-devel] [PATCH v5 19/38] block: Fail requests to empty BlockBackend, Max Reitz, 2015/09/18