From: Eric Blake <eblake@redhat.com>
To: Max Reitz <mreitz@redhat.com>, qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] vvfat: Fix qcow write target driver specification
Date: Mon, 11 Jul 2016 08:06:17 -0600 [thread overview]
Message-ID: <5783A7D9.3020102@redhat.com> (raw)
In-Reply-To: <20160711135452.11304-1-mreitz@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]
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 <mreitz@redhat.com>
> ---
> block/vvfat.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
>
> 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2016-07-11 14:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-11 13:54 [Qemu-devel] [PATCH] vvfat: Fix qcow write target driver specification Max Reitz
2016-07-11 14:06 ` Eric Blake [this message]
2016-07-11 14:13 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5783A7D9.3020102@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.