[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH] block: allow write-threshold on de
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH] block: allow write-threshold on device name |
Date: |
Mon, 08 Jun 2015 08:35:21 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 |
On 06/07/2015 02:53 AM, Amos Kong wrote:
> 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(-)
>>
>> - 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?
Yes. The two namespaces cannot overlap, so it is unambiguous that a
device name means the active node attached to the device (we use it in a
number of other commands).
> do we need to update command doc in qapi/block-core.json?
Good call; existing docs state:
# @block-set-write-threshold
...
# @node-name: graph node name on which the threshold must be set.
...
{ 'command': 'block-set-write-threshold',
'data': { 'node-name': 'str', 'write-threshold': 'uint64' } }
so I'll prepare a v2 that tweaks it.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature