qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: allow write-threshold on device name


From: Amos Kong
Subject: Re: [Qemu-devel] [PATCH] block: allow write-threshold on device name
Date: Sun, 7 Jun 2015 16:53:02 +0800

On Sun, Jun 7, 2015 at 9:38 AM, Eric Blake <address@hidden> wrote:
>
> 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 <address@hidden>
> ---
>  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 <address@hidden>
> @@ -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);

It means we can pass device name by 'node_name' parameter?
do we need to update command doc in qapi/block-core.json?


>      if (!bs) {
> -        error_setg(errp, "Device '%s' not found", node_name);
>          return;
>      }
>
> --
> 2.4.2
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]