From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zcwr4-0007Ih-3Q for qemu-devel@nongnu.org; Fri, 18 Sep 2015 10:41:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zcwqz-0003Ve-AL for qemu-devel@nongnu.org; Fri, 18 Sep 2015 10:41:38 -0400 References: <20150915022721.GE14016@ad.nay.redhat.com> From: Eric Blake Message-ID: <55FC2291.1030902@redhat.com> Date: Fri, 18 Sep 2015 08:41:21 -0600 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="i9SVu6IeOJ8NJvavMgSAUEtXC0mnE3QrC" Subject: Re: [Qemu-devel] [PATCH v4 2/4] block: support passing 'backing': '' to 'blockdev-add' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia , Fam Zheng Cc: Kevin Wolf , qemu-block@nongnu.org, qemu-devel@nongnu.org, Stefan Hajnoczi , Max Reitz This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --i9SVu6IeOJ8NJvavMgSAUEtXC0mnE3QrC Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/15/2015 12:42 AM, Alberto Garcia wrote: > On Tue 15 Sep 2015 04:27:21 AM CEST, Fam Zheng wrote:= >=20 >>> + backing =3D qdict_get_try_str(options, "backing"); >>> + if (backing && *backing =3D=3D '\0') { >>> + flags |=3D BDRV_O_NO_BACKING; >>> + } >>> + qdict_del(options, "backing"); >>> + >=20 >> Specifying a non-empty "backing" will be a slient nop now, but it used= >> to be an error before. Should we return an error? >=20 > Ah, yes, I think it should return an error. Thanks! With this squashed in, Reviewed-by: Eric Blake >=20 > --- a/block.c > +++ b/block.c > @@ -1473,8 +1473,8 @@ static int bdrv_open_inherit(BlockDriverState > **pbs, const char *filename, > backing =3D qdict_get_try_str(options, "backing"); > if (backing && *backing =3D=3D '\0') { > flags |=3D BDRV_O_NO_BACKING; > + qdict_del(options, "backing"); > } > - qdict_del(options, "backing"); >=20 > Berto >=20 >=20 --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --i9SVu6IeOJ8NJvavMgSAUEtXC0mnE3QrC 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/ iQEcBAEBCAAGBQJV/CKRAAoJEKeha0olJ0Nq7n0H/3fN1+LHyoNPKJ8wtNopknfr p5ExCtrdCmZTRMisBGoGtDe9/7qSA/XbmWaJCPBM0o7JwmyVANGBrJVEMKrOrZu5 x+T5T8wSM/1T84GWh/nNyPx3Kf64UycNR3jqJbDB0xiqhfnhzqSfQo6vEXLwcPcV Lh2hBfNAep0uo0mYcee5BK/uoD9WNntLN7psaOibYXXF6Z3cwVh4U/VGyi4bkiHz lbiFa0iQukCIA/10tFchuabOi+sMAaNqv2s8G7pYL+AFajuVVZgPXmpp4K/j39oK PxaS93s2Ue94OqyIcSoMV4QrfNyG2X+I8ulQqLd+28yTHGrlLTH6kT3FmWikYXI= =fSL/ -----END PGP SIGNATURE----- --i9SVu6IeOJ8NJvavMgSAUEtXC0mnE3QrC--