[libvirt] [PATCH 1/2] conf: Format the "nocow" field.

Michal Privoznik mprivozn at redhat.com
Fri Dec 9 14:38:09 UTC 2016


On 07.12.2016 16:31, John Ferlan wrote:
> Commit id 'a9fd30e63' added a '<nocow/>' field to be parsed, but
> didn't Format the field on output. This patch fixes that and adds
> the vol-qcow2-nocow test to/for storagevolxml2xml
> 
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
>  src/conf/storage_conf.c                        | 2 ++
>  tests/storagevolxml2xmlout/vol-qcow2-nocow.xml | 1 +
>  tests/storagevolxml2xmltest.c                  | 1 +
>  3 files changed, 4 insertions(+)
> 
> diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
> index 7e7bb72..dc7cc25 100644
> --- a/src/conf/storage_conf.c
> +++ b/src/conf/storage_conf.c
> @@ -1590,6 +1590,8 @@ virStorageVolTargetDefFormat(virStorageVolOptionsPtr options,
>              return -1;
>  
>      virBufferEscapeString(buf, "<compat>%s</compat>\n", def->compat);
> +    if (def->nocow)
> +        virBufferAddLit(buf, "<nocow/>\n");
>  

I wonder whether we should detect this flag over a volume and set it so
that vol-dumpxml reports the flag even after libvirtd restart.

Michal




More information about the libvir-list mailing list