qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] vvfat: Fix qcow write target driver specificati


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH] vvfat: Fix qcow write target driver specification
Date: Mon, 11 Jul 2016 08:06:17 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 07/11/2016 07:54 AM, Max Reitz wrote:
> First, bdrv_open_child() expects all options for the child to be
> prefixed by the child's name (and a separating dot). Second,
> bdrv_open_child() does not take ownership of the QDict passed to it but
> only extracts all options for the child, so if a QDict is created for
> the sole purpose of passing it to bdrv_open_child(), it needs to be
> freed afterwards.
> 
> This patch makes vvfat adhere to both of these rules.
> 
> Signed-off-by: Max Reitz <address@hidden>
> ---
>  block/vvfat.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Reviewed-by: Eric Blake <address@hidden>

> 
> diff --git a/block/vvfat.c b/block/vvfat.c
> index c3f24c6..ba2620f 100644
> --- a/block/vvfat.c
> +++ b/block/vvfat.c
> @@ -3018,9 +3018,10 @@ static int enable_write_target(BlockDriverState *bs, 
> Error **errp)
>      }
>  
>      options = qdict_new();
> -    qdict_put(options, "driver", qstring_from_str("qcow"));
> +    qdict_put(options, "write-target.driver", qstring_from_str("qcow"));
>      s->qcow = bdrv_open_child(s->qcow_filename, options, "write-target", bs,
>                                &child_vvfat_qcow, false, errp);
> +    QDECREF(options);
>      if (!s->qcow) {
>          ret = -EINVAL;
>          goto err;
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]