From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56046) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axxjI-0001nx-Ua for qemu-devel@nongnu.org; Wed, 04 May 2016 10:24:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axxj7-0000Vy-A9 for qemu-devel@nongnu.org; Wed, 04 May 2016 10:24:39 -0400 References: <1461346962-4676-1-git-send-email-kwolf@redhat.com> <1461346962-4676-3-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <572A05FD.6080808@redhat.com> Date: Wed, 4 May 2016 08:23:57 -0600 MIME-Version: 1.0 In-Reply-To: <1461346962-4676-3-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="pSJJlt03hWS5D6x1Lw7o9q2hjt7IqWgPi" Subject: Re: [Qemu-devel] [PATCH v2 02/13] block: Introduce BlockBackendPublic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: pbonzini@redhat.com, berto@igalia.com, mreitz@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --pSJJlt03hWS5D6x1Lw7o9q2hjt7IqWgPi Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 04/22/2016 11:42 AM, Kevin Wolf wrote: > Some features, like I/O throttling, are implemented outside > block-backend.c, but still want to keep information in BlockBackend, > e.g. list entries that allow keeping a list of BlockBackends. >=20 > In order to avoid exposing the whole struct layout in the public header= > file, this patch introduces an embedded public struct where such > information can be added and a pair of functions to convert between > BlockBackend and BlockBackendPublic. >=20 > Signed-off-by: Kevin Wolf > --- > +/* This struct is embedded in (the private) BlockBackend struct and co= ntains > + * fields that must be public. This is in particular for QLIST_ENTRY()= and > + * friends so that BlockBackends can be kept in lists outside block-ba= ckend.c */ > +typedef struct BlockBackendPublic { > + int dummy; /* empty structs are illegal */ Nit - it's not breaking any laws, so s/illegal/invalid/ sounds slightly better. But not enough to stop me from reviewing. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --pSJJlt03hWS5D6x1Lw7o9q2hjt7IqWgPi 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/ iQEcBAEBCAAGBQJXKgX9AAoJEKeha0olJ0NqCbMH/34Ggt4Wec9+/CyWKsSEeNXL +4pi/DN4hp+4VINrwlPVZtsEBIBT/KS2ZkyUMYkwzgJ3E5njNiIOp7ypX47iqB8b tCziuxCq92HMLRNlFR6MIraFTR0PTuGETVjm1h2CRX7E8py6+saWlmGwT5GMU1QQ yBNNYDyrAHSKUEgR5KEG/3b5TtaP8/KCvw8w6w4532UE0xlroOOaPF4NtsT7Oy2H pJy0TlBAgtrIaQ9p0BGDygr2Jxd4EjYVbeYintPIq5wn2cjwW95dZipJUKtICOs/ VTcEAf9yMamE5cATWbliw0mj/LBhguf/VOH9Cu5k1Op4ivN6e63Xz01X8m1+YmU= =/KUq -----END PGP SIGNATURE----- --pSJJlt03hWS5D6x1Lw7o9q2hjt7IqWgPi--