From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aj0Hl-0002mn-1U for qemu-devel@nongnu.org; Thu, 24 Mar 2016 04:06:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aj0Hk-00051B-3I for qemu-devel@nongnu.org; Thu, 24 Mar 2016 04:06:28 -0400 Date: Thu, 24 Mar 2016 09:06:19 +0100 From: Kevin Wolf Message-ID: <20160324080619.GA4310@noname.redhat.com> References: <1458660792-3035-1-git-send-email-kwolf@redhat.com> <1458660792-3035-4-git-send-email-kwolf@redhat.com> <56F1BEEE.5010307@redhat.com> <20160323090944.GB4126@noname.redhat.com> <56F30C2C.8000704@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="YZ5djTAD1cGYuMQK" Content-Disposition: inline In-Reply-To: <56F30C2C.8000704@redhat.com> Subject: Re: [Qemu-devel] [PATCH 03/12] block: Introduce BlockBackendPublic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: berto@igalia.com, qemu-devel@nongnu.org, qemu-block@nongnu.org --YZ5djTAD1cGYuMQK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 23.03.2016 um 22:35 hat Eric Blake geschrieben: > On 03/23/2016 03:09 AM, Kevin Wolf wrote: > >>> +++ b/block/block-backend.c > >>> @@ -33,6 +33,7 @@ struct BlockBackend { > >>> DriveInfo *legacy_dinfo; /* null unless created by drive_new(= ) */ > >>> QTAILQ_ENTRY(BlockBackend) link; /* for block_backends */ > >>> QTAILQ_ENTRY(BlockBackend) monitor_link; /* for monitor_block_ba= ckends */ > >>> + BlockBackendPublic public; > >> > >> Any reason to not put the public struct at offset 0? > >=20 > > No, but also no reason to put it there. :-) >=20 > True. >=20 > >>> +typedef struct BlockBackendPublic { > >>> +} BlockBackendPublic; > >> > >> No fields? So really all we need this for is so that we can have an > >> address of a member of the larger struct, so that we can do list > >> operations based on that address? > >=20 > > Well, a list still needs a QLIST_ENTRY, otherwise I could have directly > > used BlockBackend. I just tried to keep the introduction of .public > > separate from the addition of a specific list. > >=20 > > I think it's strictly speaking invalid C to have an empty struct, but > > gcc compiles it and so I thought it should be acceptable to have one for > > a single commit until something is added there. >=20 > clang gripes; see commit 83ecb22ba. >=20 > But breaking bisection for one patch on clang-only is different than > breaking bisection on all compilers, so up to you what you want to do > about it. We can always have an int dummy in there... Kevin --YZ5djTAD1cGYuMQK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJW85/7AAoJEH8JsnLIjy/W/NgQAJHmnIWJGVx2a5EtQXCV+l4W Nepb0nwZI8dqi20yo0bl9X+OEBrfIcODgd/rvDRam53pl9L95thmsDdTXFRbC/0B /yv2LZGhgsgTym+sorkF416bCf11t6anuj6BHncQn2GgD88NOV9wPMnZYgBtx6oi qX0wS+jzednE212OY7S/jt3OHqkEzi8DiMzvFl6g0eOudIz1FGxLOT6efAnzc45L tvbMT+XXTOD2lcUbLrI1QMOJJyiDVe1vRXFhuhafoOPQyctrMFuqCV1nM7NMZRru K+WcBTASSE2CHyisEjcFiHxrzy2x/pbdBnyJBpxELYpfinu627AHkpU9hYUMGMKy NuXD5GVPEnZg7F3T0M3+DAV1MixmB7fXVNNYosmarMJ8YF4KzTvK5o5wSZ6Dti7q bBwsH6zJ0t7bVOu2nEU+0JzEuvENZN+AwnXHnso4CDvrupOQYzq1JE4ctQa67TjG DhvkHVGUglPa/Dtnfz2Y70kKfA+tRv5Y/M6/DeczubKuybVt+Slhnta6hIa84lwx /EAiwfxw/C2HepShampi+JC5LvnG50ItarHbRbF2g7HqIK10j/fKupWsvYoySGgZ Eto+/Ti0VO2LcKPA6GxZpeXN+btfiuaSRXSGKyYX+V+b19z8w7BfeytgsSX2++JM jhjGkniAG6JD1XZsVD2l =C81M -----END PGP SIGNATURE----- --YZ5djTAD1cGYuMQK--