All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] hmp: fix block_set_io_throttle
@ 2017-01-20 23:03 Eric Blake
  2017-01-23 11:27 ` Stefan Hajnoczi
  2017-02-21 15:10 ` Dr. David Alan Gilbert
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Blake @ 2017-01-20 23:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, qemu-stable, Dr. David Alan Gilbert

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>
---

 hmp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hmp.c b/hmp.c
index b869617..a3dc9d6 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1551,6 +1551,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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] hmp: fix block_set_io_throttle
  2017-01-20 23:03 [Qemu-devel] [PATCH] hmp: fix block_set_io_throttle Eric Blake
@ 2017-01-23 11:27 ` Stefan Hajnoczi
  2017-02-21 15:10 ` Dr. David Alan Gilbert
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2017-01-23 11:27 UTC (permalink / raw)
  To: Eric Blake; +Cc: qemu-devel, kwolf, qemu-stable, Dr. David Alan Gilbert

[-- Attachment #1: Type: text/plain, Size: 529 bytes --]

On Fri, Jan 20, 2017 at 05:03:59PM -0600, Eric Blake wrote:
> 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>
> ---
> 
>  hmp.c | 1 +
>  1 file changed, 1 insertion(+)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] hmp: fix block_set_io_throttle
  2017-01-20 23:03 [Qemu-devel] [PATCH] hmp: fix block_set_io_throttle Eric Blake
  2017-01-23 11:27 ` Stefan Hajnoczi
@ 2017-02-21 15:10 ` Dr. David Alan Gilbert
  1 sibling, 0 replies; 3+ messages in thread
From: Dr. David Alan Gilbert @ 2017-02-21 15:10 UTC (permalink / raw)
  To: Eric Blake; +Cc: qemu-devel, kwolf, qemu-stable

* Eric Blake (eblake@redhat.com) wrote:
> 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>

Queued for HMP

> ---
> 
>  hmp.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hmp.c b/hmp.c
> index b869617..a3dc9d6 100644
> --- a/hmp.c
> +++ b/hmp.c
> @@ -1551,6 +1551,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
> 
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-02-21 15:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-20 23:03 [Qemu-devel] [PATCH] hmp: fix block_set_io_throttle Eric Blake
2017-01-23 11:27 ` Stefan Hajnoczi
2017-02-21 15:10 ` Dr. David Alan Gilbert

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.