[libvirt] [PATCH 1/5] Add virDomainGetBlockInfo API to query disk sizing

Eric Blake eblake at redhat.com
Tue Apr 27 22:16:24 UTC 2010

On 04/27/2010 01:34 PM, Daniel P. Berrange wrote:
> Some applications need to be able to query a guest's disk info,
> even for paths not managed by the storage pool APIs. This adds
> a very simple API to get this information, modelled on the
> virStorageVolGetInfo API, but with an extra field 'physical'.
> Normally 'physical' and 'allocation' will be identical, but
> in the case of a qcow2-like file stored inside a block device
> 'physical' will give the block device size, while 'allocation'
> will give the qcow2 image size

ACK, and thanks for the examples in the comments.

> + *  - Fully allocated raw file in filesystem:
> + *       * capacity, allocation, physical: All the same

Actually, might it be possible that allocation/physical might be
slightly higher than capacity, to account for inode overhead and
rounding up to block size?  But I don't see the need to clutter this
documentation with that level of detail.

Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100427/c86fd77c/attachment-0001.sig>

More information about the libvir-list mailing list