[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 9/9] throttle: add name of ThrottleGroup to Bloc

From: Alberto Garcia
Subject: Re: [Qemu-devel] [PATCH 9/9] throttle: add name of ThrottleGroup to BlockDeviceInfo
Date: Thu, 26 Feb 2015 14:56:06 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Wed, Feb 25, 2015 at 08:23:10AM -0700, Eric Blake wrote:

> How about query-block-throttle, returning an array of dicts.
> => { "execute":"query-block-throttle" }
> <= { "return": [
>      { "name": "throttle1", "bps_max": 100000,
>        "nodes": [ "block0", "block1" ] },
>      { "name": "throttle2", "iops_max": 10000,
>        "nodes": [ "block2" ] }
>    ] }

Ok I wrote it, however I have some doubts about what to put exactly in
the 'nodes' array.

We can just put node names as you suggest, however at the moment not
all nodes have a name so we could end up with a list of empty strings.

I think the easiest solution in terms of lines of code and simplicity
of the return type is this one:

{ 'type': 'ThrottleGroupInfo',
  'data': { 'name': 'str', 'nodes': ['BlockDeviceInfo'] } }

{ 'command': 'query-block-throttle',
  'returns': ['ThrottleGroupInfo'] }

All the information is there, the code to fill the BlockDeviceInfo
structure is already written so I can just make use of it.

The throttling settings themselves are not present in
ThrottleGroupInfo, but since all nodes from a group have the same
settings, you can get them from any of them. It also keeps the
ThrottleGroupInfo structure simpler.

What do you think? If you're ok with this solution I can submit the
patch series again.


reply via email to

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