qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Manos Pitsidianakis <el13635@mail.ntua.gr>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	qemu-block <qemu-block@nongnu.org>,
	Alberto Garcia <berto@igalia.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v9 4/6] block: convert ThrottleGroup to object with QOM
Date: Tue, 5 Sep 2017 17:21:07 +0200	[thread overview]
Message-ID: <20170905152107.GN4633@localhost.localdomain> (raw)
In-Reply-To: <20170825132028.6184-5-el13635@mail.ntua.gr>

Am 25.08.2017 um 15:20 hat Manos Pitsidianakis geschrieben:
> 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.
> 
> ThrottleGroups can be created via CLI as
>     -object throttle-group,id=foo,x-iops-total=100,x-..
> where x-* are individual limit properties. Since we can't add non-scalar
> properties in -object this interface must be used instead. However,
> setting these properties must be disabled after initialization because
> certain combinations of limits are forbidden and thus configuration
> changes should be done in one transaction. The individual properties
> will go away when support for non-scalar values in CLI is implemented
> and thus are marked as experimental.
> 
> ThrottleGroup also has a `limits` property that uses the ThrottleLimits
> struct.  It can be used to create ThrottleGroups or set the
> configuration in existing groups as follows:
> 
> { "execute": "object-add",
>   "arguments": {
>     "qom-type": "throttle-group",
>     "id": "foo",
>     "props" : {
>       "limits": {
>           "iops-total": 100
>       }
>     }
>   }
> }
> { "execute" : "qom-set",
>     "arguments" : {
>         "path" : "foo",
>         "property" : "limits",
>         "value" : {
>             "iops-total" : 99
>         }
>     }
> }
> 
> This also means a group's configuration can be fetched with qom-get.
> 
> Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>

> +static bool throttle_group_can_be_deleted(UserCreatable *uc, Error **errp)
> +{
> +    return OBJECT(uc)->ref == 1;
> +}
> +
> +static void throttle_group_obj_class_init(ObjectClass *klass, void *class_data)
> +{
> +    size_t i = 0;
> +    UserCreatableClass *ucc = USER_CREATABLE_CLASS(klass);
> +
> +    ucc->complete = throttle_group_obj_complete;
> +    ucc->can_be_deleted = throttle_group_can_be_deleted;

block/throttle-groups.c: In function 'throttle_group_obj_class_init':
block/throttle-groups.c:880:25: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
     ucc->can_be_deleted = throttle_group_can_be_deleted;

This is from a semantic conflict with commit 3beacfb9 ('qom: Remove
unused errp parameter from can_be_deleted()'). If the rest of the series
is okay, I'll just remove the **errp parameter while applying.

Kevin

  parent reply	other threads:[~2017-09-05 15:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-25 13:20 [Qemu-devel] [PATCH v9 0/6] add throttle block driver filter Manos Pitsidianakis
2017-08-25 13:20 ` [Qemu-devel] [PATCH v9 1/6] block: move ThrottleGroup membership to ThrottleGroupMember Manos Pitsidianakis
2017-08-25 13:20 ` [Qemu-devel] [PATCH v9 2/6] block: add aio_context field in ThrottleGroupMember Manos Pitsidianakis
2017-08-25 13:20 ` [Qemu-devel] [PATCH v9 3/6] block: tidy ThrottleGroupMember initializations Manos Pitsidianakis
2017-08-25 13:20 ` [Qemu-devel] [PATCH v9 4/6] block: convert ThrottleGroup to object with QOM Manos Pitsidianakis
2017-08-28  9:52   ` Alberto Garcia
2017-09-05 13:49   ` Stefan Hajnoczi
2017-09-05 15:21   ` Kevin Wolf [this message]
2017-08-25 13:20 ` [Qemu-devel] [PATCH v9 5/6] block: add throttle block filter driver Manos Pitsidianakis
2017-09-05 13:58   ` Stefan Hajnoczi
2017-08-25 13:20 ` [Qemu-devel] [PATCH v9 6/6] qemu-iotests: add 184 for throttle " Manos Pitsidianakis
2017-09-05 14:01   ` Stefan Hajnoczi
2017-09-05 16:16   ` Kevin Wolf
2017-09-05 19:06     ` [Qemu-devel] [Qemu-block] " Kevin Wolf
2017-09-05 21:13       ` Eric Blake
2017-09-06  8:26         ` Manos Pitsidianakis
2017-09-06  8:32           ` Kevin Wolf
2017-09-05 14:01 ` [Qemu-devel] [PATCH v9 0/6] add throttle block driver filter Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170905152107.GN4633@localhost.localdomain \
    --to=kwolf@redhat.com \
    --cc=berto@igalia.com \
    --cc=el13635@mail.ntua.gr \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).