From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvTNt-0000Sq-1V for qemu-devel@nongnu.org; Mon, 01 Dec 2014 10:59:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XvTNo-0004XH-H2 for qemu-devel@nongnu.org; Mon, 01 Dec 2014 10:59:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvTNo-0004X7-9M for qemu-devel@nongnu.org; Mon, 01 Dec 2014 10:59:28 -0500 Message-ID: <547C9058.5050708@redhat.com> Date: Mon, 01 Dec 2014 08:59:20 -0700 From: Eric Blake MIME-Version: 1.0 References: <1417099720-16428-1-git-send-email-mreitz@redhat.com> <1417099720-16428-2-git-send-email-mreitz@redhat.com> In-Reply-To: <1417099720-16428-2-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EvoTdcCxiGDwsGd8k4vGEW2SHOc7CgcbM" Subject: Re: [Qemu-devel] [PATCH v2 01/13] block: Make essential BlockDriver objects public List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Peter Lieven , Markus Armbruster , Stefan Hajnoczi This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EvoTdcCxiGDwsGd8k4vGEW2SHOc7CgcbM Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/27/2014 07:48 AM, Max Reitz wrote: > There are some block drivers which are essential to QEMU and may not be= > removed: These are raw, file and qcow2 (as the default non-raw format).= > Make their BlockDriver objects public so they can be directly reference= d > throughout the block layer without needing to call bdrv_find_format() > and having to deal with an error at runtime, while the real problem > occured during linking (where raw, file or qcow2 were not linked into s/occured/occurred/ > qemu). >=20 > Cc: qemu-stable@nongnu.org > Signed-off-by: Max Reitz > --- > block/qcow2.c | 4 ++-- > block/raw-posix.c | 4 ++-- > block/raw-win32.c | 4 ++-- > block/raw_bsd.c | 4 ++-- > include/block/block_int.h | 8 ++++++++ > 5 files changed, 16 insertions(+), 8 deletions(-) Reviewed-by: Eric Blake > +++ b/block/qcow2.c > @@ -2847,7 +2847,7 @@ static QemuOptsList qcow2_create_opts =3D { > } > }; > =20 > -static BlockDriver bdrv_qcow2 =3D { > +BlockDriver *bdrv_qcow2 =3D &(BlockDriver){ Do we want any use of 'const', to avoid accidental manipulation of the pointer and/or pointed-to contents? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --EvoTdcCxiGDwsGd8k4vGEW2SHOc7CgcbM 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUfJBYAAoJEKeha0olJ0Nq/YAH/1VWpZlUsokCVfpELW9dKiiY b222LAiyvePkNWxmKXi148/npIGb89YIf1wbNzBN2oT/DJRO+P6S4FktT7pNCZCW tGnyDVFr6jW+LBdzpPrXqQQ1daxBuJWpNYA0iJKF8wSLO4K+/JABH9MCARoSHG76 YmktV3r0px3Fq/GBF6g2Gm7AySzuh23Kp0ykMuGryLa0SDRSveOPVmvIFrzUzTB+ pUHox7uwrZmlydmoxuXpkxTjLqH2RP7zYwpF3GcjL81KTMBBlM5tNzlMPDoJ2zQj JllhNMg2L0rg7BnzGHlsrZk2g4x4hyYDei4nkVgc6PdeNBvOBGZp2nuP7nqM5oo= =FkwT -----END PGP SIGNATURE----- --EvoTdcCxiGDwsGd8k4vGEW2SHOc7CgcbM--