From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52851) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMbqx-0006nA-MH for qemu-devel@nongnu.org; Mon, 11 Jul 2016 10:06:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMbqs-0008HT-1i for qemu-devel@nongnu.org; Mon, 11 Jul 2016 10:06:31 -0400 References: <20160711135452.11304-1-mreitz@redhat.com> From: Eric Blake Message-ID: <5783A7D9.3020102@redhat.com> Date: Mon, 11 Jul 2016 08:06:17 -0600 MIME-Version: 1.0 In-Reply-To: <20160711135452.11304-1-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="oUQQ03IhxWGsFNL0inQX9akGiCHlO8Q4h" Subject: Re: [Qemu-devel] [PATCH] vvfat: Fix qcow write target driver specification List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --oUQQ03IhxWGsFNL0inQX9akGiCHlO8Q4h From: Eric Blake To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , qemu-devel@nongnu.org Message-ID: <5783A7D9.3020102@redhat.com> Subject: Re: [Qemu-devel] [PATCH] vvfat: Fix qcow write target driver specification References: <20160711135452.11304-1-mreitz@redhat.com> In-Reply-To: <20160711135452.11304-1-mreitz@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > This patch makes vvfat adhere to both of these rules. >=20 > Signed-off-by: Max Reitz > --- > block/vvfat.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Eric Blake >=20 > 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) > } > =20 > options =3D qdict_new(); > - qdict_put(options, "driver", qstring_from_str("qcow")); > + qdict_put(options, "write-target.driver", qstring_from_str("qcow")= ); > s->qcow =3D bdrv_open_child(s->qcow_filename, options, "write-targ= et", bs, > &child_vvfat_qcow, false, errp); > + QDECREF(options); > if (!s->qcow) { > ret =3D -EINVAL; > goto err; >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --oUQQ03IhxWGsFNL0inQX9akGiCHlO8Q4h Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXg6fZAAoJEKeha0olJ0Nq/04H/jj+kUtbPcZZF1Z3dSFk5SvG ZCEPOv3MQQhS8RKL+HWmg8wYm/nUUIpAAoyhXgKIn7PVVPvYPCG1S6KEdV5GxMxP h74zT1Bymv5oZEHuuyxrgVoYkGLrZan7bU0xRlZFqHlkpJT9hkEcdCsi1Tsd/fM/ p4DxvbFgW7Q10gkdxhYYec0u41tgaSBtpibgLEn+staucmLTFFrefN0XU1l7IB2U 6ZKBsf5LeLl6ZujuVaEyX1+NuhhbVBefCClDLRJUAU+o2N7/mr13XHdbFJrfSyk0 1oDj0ToJZ6RiO69THSrDAcVmRr0naWSmDMOhJ/DH37ZzwEV117WMLOFEWLfiAzs= =BUel -----END PGP SIGNATURE----- --oUQQ03IhxWGsFNL0inQX9akGiCHlO8Q4h--