qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block: allow write-threshold on device name
@ 2015-06-07  1:38 Eric Blake
  2015-06-07  8:53 ` Amos Kong
  2015-06-09 22:35 ` Eric Blake
  0 siblings, 2 replies; 8+ messages in thread
From: Eric Blake @ 2015-06-07  1:38 UTC (permalink / raw)
  To: qemu-devel, qemu-block; +Cc: kwolf, fromani

Commit e2462113 allowed the ability to fire an event if a BDS
node exceeds a threshold during a write, but limited the option
to only work on node names.  For convenience, expand this to
allow a device name as a way to set the threshold on the BDS
at the active layer of the device.

Signed-off-by: Eric Blake <eblake@redhat.com>
---
 block/write-threshold.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/block/write-threshold.c b/block/write-threshold.c
index a53c1f5..e3df419 100644
--- a/block/write-threshold.c
+++ b/block/write-threshold.c
@@ -1,7 +1,7 @@
 /*
  * QEMU System Emulator block write threshold notification
  *
- * Copyright Red Hat, Inc. 2014
+ * Copyright Red Hat, Inc. 2014, 2015
  *
  * Authors:
  *  Francesco Romani <fromani@redhat.com>
@@ -110,9 +110,8 @@ void qmp_block_set_write_threshold(const char *node_name,
     BlockDriverState *bs;
     AioContext *aio_context;

-    bs = bdrv_find_node(node_name);
+    bs = bdrv_lookup_bs(node_name, node_name, errp);
     if (!bs) {
-        error_setg(errp, "Device '%s' not found", node_name);
         return;
     }

-- 
2.4.2

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

end of thread, other threads:[~2015-06-10 14:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-07  1:38 [Qemu-devel] [PATCH] block: allow write-threshold on device name Eric Blake
2015-06-07  8:53 ` Amos Kong
2015-06-08 14:35   ` Eric Blake
2015-06-09 22:35 ` Eric Blake
2015-06-10  7:57   ` Kevin Wolf
2015-06-10 13:07     ` Eric Blake
2015-06-10 13:43       ` Kevin Wolf
2015-06-10 14:53         ` Eric Blake

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