From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:49307) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URqYh-0005rY-Tt for qemu-devel@nongnu.org; Mon, 15 Apr 2013 17:03:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URqYe-0002BW-Mf for qemu-devel@nongnu.org; Mon, 15 Apr 2013 17:03:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URqYe-0002BS-Co for qemu-devel@nongnu.org; Mon, 15 Apr 2013 17:03:24 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3FL3NiZ021582 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Apr 2013 17:03:23 -0400 Message-ID: <516C6B1A.6010209@redhat.com> Date: Mon, 15 Apr 2013 15:03:22 -0600 From: Eric Blake MIME-Version: 1.0 References: <1365799688-19918-1-git-send-email-kwolf@redhat.com> <1365799688-19918-16-git-send-email-kwolf@redhat.com> In-Reply-To: <1365799688-19918-16-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2WMDGESKACSSNKWUVIPXE" Subject: Re: [Qemu-devel] [PATCH 15/15] block: Allow overriding backing.file.filename List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, stefanha@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2WMDGESKACSSNKWUVIPXE Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/12/2013 02:48 PM, Kevin Wolf wrote: > If a filename is passed in the driver-specific options from the command= > line, the backing file path from the image is ignored now. >=20 > Signed-off-by: Kevin Wolf > --- > block.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/block.c b/block.c > index c2d1d2d..3a45c2a 100644 > --- a/block.c > +++ b/block.c > @@ -889,7 +889,9 @@ int bdrv_open_backing_file(BlockDriverState *bs, QD= ict *options) > } > =20 > bs->open_flags &=3D ~BDRV_O_NO_BACKING; > - if (bs->backing_file[0] =3D=3D '\0' && qdict_size(options) =3D=3D = 0) { > + if (qdict_haskey(options, "file.filename")) { > + backing_filename[0] =3D '\0'; > + } else if (bs->backing_file[0] =3D=3D '\0' && qdict_size(options) = =3D=3D 0) { Of course, the user can abuse this at their peril, but the flexibility it adds (being able to pass in a /dev/fdset to let the command line specify an open fd as backing file even when open() is forbidden on NFS) is just AWESOME! Looking forward to a QMP counterpart; I'll definitely review that, as libvirt is still reluctant to use fdsets for image manipulation on the command line if we can't follow it up with hot-plug manipulation, but I love where this is heading. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2WMDGESKACSSNKWUVIPXE Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRbGsaAAoJEKeha0olJ0Nqk1wH/jE5OmHVCPwh1o0LSsXxDyFU 4gKJmON113iEu6xq84voLhdiucGdCVDge7/93i7U1ewvzZRUlEeiHEGH2tE6vZpx rJwNs1Dc8ONozZEwx+VxcWDOCXTUBaW96DAs6f7Y4IOQABG/hOC3QFsIhWQ2/+rq nq5bFygZFW94s2XTDRF2B71G6ww3s/SAFFclzEc7o8JY0wTwIY6DBdwBe3bbL+cR m9iFidbo7+jOvlnEuxWxLazT3VRLWys4qNuS4tTEuuRwiUA5A6N0oQ5Mh7tddZqS qDNvj/QXURij9EL6cdYFUgGwhmEzhg0BM1Igi7c6tdRzZwp2d2tXGaLkHPRSUVk= =ok+F -----END PGP SIGNATURE----- ------enig2WMDGESKACSSNKWUVIPXE--