[libvirt] ideas on virDomainListBlockStats for allocation numbers

Peter Krempa pkrempa at redhat.com
Mon Nov 24 16:12:39 UTC 2014

On 11/24/14 15:58, Adam Litke wrote:
> On 21/11/14 23:03 -0700, Eric Blake wrote:


>> The problem is that once we have a domain with more than one <disk>, and
>> where one or all disks have more than one <backingStore>, then how
>> should virDomainListBlockStats represent that?
>> One idea I have is to just expose a block.count equal to the total
>> number of devices I'm about to report on, where the array can be larger
>> than the number of disks, and using the name field to correlate back to
>> dumpxml layout:
> I prefer this approach as well.  However, I don't really like having
> to parse the name to pluck the index from between the [].  Could this
> just be exposed as a first order stat, ie:
> block.count=3
> block.0.name=vda
> block.0.backing_index=0
> ...
> block.1.name=vda
> block.1.backing_index=1
> ...
> block.2.name=vdb
> block.2.backing_index=0

I'd go with "backing_id". When we switch to node names, the namespace
(or numberspace) will become sparse eventually.


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

More information about the libvir-list mailing list