On 06/07/2015 02:53 AM, Amos Kong wrote: > On Sun, Jun 7, 2015 at 9:38 AM, Eric Blake <ebl...@redhat.com> 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 <ebl...@redhat.com> >> --- >> 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