Re: [Qemu-devel] [PATCH v7 4/6] block: convert ThrottleGroup to object with QOM

2017-08-22 Thread Manos Pitsidianakis
On Tue, Aug 22, 2017 at 03:25:41PM +0200, Alberto Garcia wrote: +/* This function edits throttle_groups and must be called under the global + * mutex */ +static void throttle_group_obj_complete(UserCreatable *obj, Error **errp) +{ +ThrottleGroup *tg = THROTTLE_GROUP(obj); +ThrottleConfig

Re: [Qemu-devel] [PATCH v7 4/6] block: convert ThrottleGroup to object with QOM

2017-08-22 Thread Alberto Garcia
On Tue 22 Aug 2017 12:15:33 PM CEST, Manos Pitsidianakis wrote: > +static ThrottleGroup *throttle_group_by_name(const char *name) > +{ > +ThrottleGroup *iter; > + > +/* Look for an existing group with that name */ > +QTAILQ_FOREACH(iter, &throttle_groups, list) { > +if (!g_strc

[Qemu-devel] [PATCH v7 4/6] block: convert ThrottleGroup to object with QOM

2017-08-22 Thread Manos Pitsidianakis
ThrottleGroup is converted to an object. This will allow the future throttle block filter drive easy creation and configuration of throttle groups in QMP and cli. A new QAPI struct, ThrottleLimits, is introduced to provide a shared struct for all throttle configuration needs in QMP. ThrottleGroup