From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:52069) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIQc8-00031n-BL for qemu-devel@nongnu.org; Wed, 20 Mar 2013 17:32:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UIQc6-0002iD-S7 for qemu-devel@nongnu.org; Wed, 20 Mar 2013 17:32:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UIQc6-0002i9-Jh for qemu-devel@nongnu.org; Wed, 20 Mar 2013 17:32:02 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2KLW0EJ007367 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 20 Mar 2013 17:32:00 -0400 Message-ID: <514A2ACF.9060606@redhat.com> Date: Wed, 20 Mar 2013 15:31:59 -0600 From: Eric Blake MIME-Version: 1.0 References: <1363804788-18535-1-git-send-email-kwolf@redhat.com> <1363804788-18535-11-git-send-email-kwolf@redhat.com> In-Reply-To: <1363804788-18535-11-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2QAXARNLSUBVDKJVNJTIA" Subject: Re: [Qemu-devel] [PATCH v2 10/12] block: Allow omitting the file name when using driver-specific options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2QAXARNLSUBVDKJVNJTIA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 03/20/2013 12:39 PM, Kevin Wolf wrote: > After this patch, using -drive with an empty file name continues to ope= n > the file if driver-specific options are used. If no driver-specific > options are specified, the semantics stay as it was: It defines a drive= > without an inserted medium. >=20 > In order to achieve this, bdrv_open() must be made safe to work with a > NULL filename parameter. The assumption that is made is that only block= > drivers which implement bdrv_parse_filename() support using driver > specific options and could therefore work without a filename. These > drivers must make sure to cope with NULL in their implementation of > .bdrv_open() (this is only NBD for now). For all other drivers, the > block layer code will make sure to error out before calling into their > code - they can't possibly work without a filename. >=20 > Now an NBD connection can be opened like this: >=20 > qemu-system-x86_64 -drive file.driver=3Dnbd,file.port=3D1234,file.hos= t=3D::1 >=20 > Signed-off-by: Kevin Wolf > --- Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2QAXARNLSUBVDKJVNJTIA 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/ iQEcBAEBCAAGBQJRSirPAAoJEKeha0olJ0NqfFIH/j2lwI29NvK5BpiJhvogl88t SeipY6qFbFbIYu9EbG11lTSyhI3ex3Pstv5eXjJir+9fzM3DaF3aWN/D1S1aMl3t IjbaVqkug9xPXPLBIZDAWo7yAGZoAWsTtVqx5YI4U6xOJ6L15eZHPKCafQZ33jpj Np/QTU8RltAgPZUdNT4k5ovibZlWVaDegFkqC4edNvS250BYJjHjvzVaAtqETLwq VN8fui+t3+QUKowmUWiCuCb3tyyQp3vUNc5yy5eQ7TKuwpC2FpGsHqrG2fjHlAov 4YMV2U6Lt4DMxbuaa42sSe9C50n39tpy4WZ50+O2i8ygrFwrn4egqNX4cv49u50= =qsYp -----END PGP SIGNATURE----- ------enig2QAXARNLSUBVDKJVNJTIA--