qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Manos Pitsidianakis <el13635@mail.ntua.gr>
Cc: qemu-devel <qemu-devel@nongnu.org>, Kevin Wolf <kwolf@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-block <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v7 5/6] block: add throttle block filter driver
Date: Thu, 24 Aug 2017 19:39:25 +0100	[thread overview]
Message-ID: <20170824183925.GC4368@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170822101535.4695-6-el13635@mail.ntua.gr>

On Tue, Aug 22, 2017 at 01:15:34PM +0300, Manos Pitsidianakis wrote:
> @@ -3095,6 +3096,20 @@
>              '*tls-creds': 'str' } }
>  
>  ##
> +# @BlockdevOptionsThrottle:
> +#
> +# Driver specific block device options for the throttle driver
> +#
> +# @throttle-group:   the name of the throttle-group object to use. It
> +#                    must already exist.
> +# @file:             reference to or definition of the data source block device
> +# Since: 2.11
> +##
> +{ 'struct': 'BlockdevOptionsThrottle',
> +  'data': { '*throttle-group': 'str',

This field is optional but:

  group_name = qemu_opt_get(opts, QEMU_OPT_THROTTLE_GROUP_NAME);
  if (!group_name) {
      error_setg(errp, "Please specify a throttle group.");
      ret = EINVAL;
      goto fin;

Should it be mandatory?

> +            'file' : 'BlockdevRef'
> +             } }
> +##
>  # @BlockdevOptions:
>  #
>  # Options for creating a block device.  Many options are available for all
> @@ -3155,6 +3170,7 @@
>        'replication':'BlockdevOptionsReplication',
>        'sheepdog':   'BlockdevOptionsSheepdog',
>        'ssh':        'BlockdevOptionsSsh',
> +      'throttle':   'BlockdevOptionsThrottle',
>        'vdi':        'BlockdevOptionsGenericFormat',
>        'vhdx':       'BlockdevOptionsGenericFormat',
>        'vmdk':       'BlockdevOptionsGenericCOWFormat',
> diff --git a/include/block/throttle-groups.h b/include/block/throttle-groups.h
> index 82f030523f..ec969e84fe 100644
> --- a/include/block/throttle-groups.h
> +++ b/include/block/throttle-groups.h
> @@ -76,5 +76,6 @@ void coroutine_fn throttle_group_co_io_limits_intercept(ThrottleGroupMember *tgm
>  void throttle_group_attach_aio_context(ThrottleGroupMember *tgm,
>                                         AioContext *new_context);
>  void throttle_group_detach_aio_context(ThrottleGroupMember *tgm);
> +bool throttle_group_exists(const char *name);
>  
>  #endif
> diff --git a/include/qemu/throttle-options.h b/include/qemu/throttle-options.h
> index 182b7896e1..3528a8f4a2 100644
> --- a/include/qemu/throttle-options.h
> +++ b/include/qemu/throttle-options.h
> @@ -29,6 +29,7 @@
>  #define QEMU_OPT_BPS_WRITE_MAX "bps-write-max"
>  #define QEMU_OPT_BPS_WRITE_MAX_LENGTH "bps-write-max-length"
>  #define QEMU_OPT_IOPS_SIZE "iops-size"
> +#define QEMU_OPT_THROTTLE_GROUP_NAME "throttle-group"
>  
>  #define THROTTLE_OPT_PREFIX "throttling."
>  #define THROTTLE_OPTS \
> diff --git a/block/throttle-groups.c b/block/throttle-groups.c
> index a4268a954e..4b483a16d4 100644
> --- a/block/throttle-groups.c
> +++ b/block/throttle-groups.c
> @@ -101,7 +101,7 @@ static ThrottleGroup *throttle_group_by_name(const char *name)
>      return NULL;
>  }
>  

/* Must be called with the global mutex held */
> -static bool throttle_group_exists(const char *name)
> +bool throttle_group_exists(const char *name)
>  {
>      return throttle_group_by_name(name) ? true : false;
>  }

  parent reply	other threads:[~2017-08-24 18:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-22 10:15 [Qemu-devel] [PATCH v7 0/6] add throttle block driver filter Manos Pitsidianakis
2017-08-22 10:15 ` [Qemu-devel] [PATCH v7 1/6] block: move ThrottleGroup membership to ThrottleGroupMember Manos Pitsidianakis
2017-08-22 10:15 ` [Qemu-devel] [PATCH v7 2/6] block: add aio_context field in ThrottleGroupMember Manos Pitsidianakis
2017-08-22 10:15 ` [Qemu-devel] [PATCH v7 3/6] block: tidy ThrottleGroupMember initializations Manos Pitsidianakis
2017-08-22 10:15 ` [Qemu-devel] [PATCH v7 4/6] block: convert ThrottleGroup to object with QOM Manos Pitsidianakis
2017-08-22 13:25   ` Alberto Garcia
2017-08-22 13:31     ` Manos Pitsidianakis
2017-08-24 18:31   ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-08-22 10:15 ` [Qemu-devel] [PATCH v7 5/6] block: add throttle block filter driver Manos Pitsidianakis
2017-08-22 14:16   ` Alberto Garcia
2017-08-22 14:22     ` Manos Pitsidianakis
2017-08-24 18:39   ` Stefan Hajnoczi [this message]
2017-08-22 10:15 ` [Qemu-devel] [PATCH v7 6/6] qemu-iotests: add 184 for throttle " Manos Pitsidianakis
2017-08-23  8:57   ` Alberto Garcia
2017-08-24 18:43   ` Stefan Hajnoczi
2017-08-24 21:15     ` Manos Pitsidianakis
2017-08-25 11:05       ` 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=20170824183925.GC4368@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=el13635@mail.ntua.gr \
    --cc=kwolf@redhat.com \
    --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).