On 07/26/2017 05:00 AM, Peter Krempa wrote:
> Store the 'drv' field both for the storage node and for the format node
> and format them in the test case.
> ---
>  src/qemu/qemu_block.c                                      | 14 
> +++++++++++---
>  src/qemu/qemu_block.h                                      |  4 ++++
>  .../qemumonitorjson-nodename-basic.result                  |  6 ++++++
>  tests/qemumonitorjsontest.c                                |  2 ++
>  4 files changed, 23 insertions(+), 3 deletions(-)
> +++ b/src/qemu/qemu_block.h
> @@ -34,6 +34,10 @@ struct qemuBlockNodeNameBackingChainData {
>      char *nodeformat;   /* node name of the format layer */
>      char *nodestorage;  /* node name of the storage backing the format node 
> */
> 
> +    /* for testing purposes */
> +    char *drvformat;
> +    char *drvstorage;
> +

Should those two fields be listed...

>      qemuBlockNodeNameBackingChainDataPtr backing;

...after this one, to make it obvious where the 'for testing purposes' ends?

>      filename    : '/var/lib/libvirt/images/rhel7.3.qcow2'
>      format node : '#block558'
> +    format drv  : 'qcow2'
>      storage node: '#block481'
> +    storage drv : 'file'

But I definitely see how it will be useful when we mix more than one
protocol, or where a backing chain ends in raw instead of qcow2.
Rearranging fields in a declaration is minor, so you are still okay adding:

Reviewed-by: Eric Blake <[email protected]>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to