[libvirt] [PATCH] qemu: Add missing VIR_DOMAIN_BLOCK_COMMIT_DELETE flags

Peter Krempa pkrempa at redhat.com
Tue Aug 27 08:47:13 UTC 2013


On 08/27/13 09:53, Alex Jia wrote:
> The flag "VIR_DOMAIN_BLOCK_COMMIT_DELETE" is missed by qemuDomainBlockCommit(),
> and then will hit error "unsupported flags (0x2) in function
> qemuDomainBlockCommit" if users run 'virsh blockcommit' with '--delete' option.
> 
> RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1001475
> 
> Signed-off-by: Alex Jia <ajia at redhat.com>
> ---
>  src/qemu/qemu_driver.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index ed29373..8863124 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -14444,7 +14444,8 @@ qemuDomainBlockCommit(virDomainPtr dom, const char *path, const char *base,
>      const char *base_canon = NULL;
>      bool clean_access = false;
>  
> -    virCheckFlags(VIR_DOMAIN_BLOCK_COMMIT_SHALLOW, -1);
> +    virCheckFlags(VIR_DOMAIN_BLOCK_COMMIT_SHALLOW |
> +                  VIR_DOMAIN_BLOCK_COMMIT_DELETE, -1);
>  
>      if (!(vm = qemuDomObjFromDomain(dom)))
>          goto cleanup;
> 

The code doesn't seem to support the BLOCK_COMMIT_DELETE flag. It was
probably just added as a future expansion. Eric, could you clarify this
please?

NACK to this patch: qemuDomainBlockCommit doesn't mention
VIR_DOMAIN_BLOCK_COMMIT_DELETE anywhere, nor it uses the flags argument
to pass down.

Peter

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130827/b4a494c2/attachment-0001.sig>


More information about the libvir-list mailing list