qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert (git)" <dgilbert@redhat.com>
To: qemu-devel@nongnu.org
Cc: eblake@redhat.com, phrdina@redhat.com, thuth@redhat.com
Subject: [Qemu-devel] [PULL 1/3] hmp: fix block_set_io_throttle
Date: Tue, 21 Feb 2017 18:55:25 +0000	[thread overview]
Message-ID: <20170221185527.3901-2-dgilbert@redhat.com> (raw)
In-Reply-To: <20170221185527.3901-1-dgilbert@redhat.com>

From: Eric Blake <eblake@redhat.com>

Commit 7a9877a made the 'device' parameter to BlockIOThrottle
optional, favoring 'id' instead.  But it forgot to update the
HMP usage to set has_device, which makes all attempts to change
throttling via HMP fail with "Need exactly one of 'device' and 'id'"

CC: qemu-stable@nongnu.org
Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20170120230359.4244-1-eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 hmp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hmp.c b/hmp.c
index 2bc4f06..0c80596 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1552,6 +1552,7 @@ void hmp_block_set_io_throttle(Monitor *mon, const QDict *qdict)
 {
     Error *err = NULL;
     BlockIOThrottle throttle = {
+        .has_device = true,
         .device = (char *) qdict_get_str(qdict, "device"),
         .bps = qdict_get_int(qdict, "bps"),
         .bps_rd = qdict_get_int(qdict, "bps_rd"),
-- 
2.9.3

  reply	other threads:[~2017-02-21 18:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-21 18:55 [Qemu-devel] [PULL 0/3] hmp queue Dr. David Alan Gilbert (git)
2017-02-21 18:55 ` Dr. David Alan Gilbert (git) [this message]
2017-02-21 18:55 ` [Qemu-devel] [PULL 2/3] monitor: add poll-* properties into query-iothreads result Dr. David Alan Gilbert (git)
2017-02-21 18:55 ` [Qemu-devel] [PULL 3/3] monitor: Fix crashes when using HMP commands without CPU Dr. David Alan Gilbert (git)
2017-02-23  9:59 ` [Qemu-devel] [PULL 0/3] hmp queue Peter Maydell

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=20170221185527.3901-2-dgilbert@redhat.com \
    --to=dgilbert@redhat.com \
    --cc=eblake@redhat.com \
    --cc=phrdina@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@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).