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

Daniel P. Berrange berrange at redhat.com
Wed Apr 28 10:54:26 UTC 2010


On Tue, Apr 27, 2010 at 04:16:24PM -0600, Eric Blake wrote:
> 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.

Yeah, there's a tiny difference, but if you squint with your eyes they are
the same :-P


Daniel
-- 
|: Red Hat, Engineering, London    -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :|
|: http://autobuild.org        -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-   F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list