From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36262) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aiqRQ-0003m7-Ry for qemu-devel@nongnu.org; Wed, 23 Mar 2016 17:35:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aiqRP-0004Ou-Ty for qemu-devel@nongnu.org; Wed, 23 Mar 2016 17:35:48 -0400 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> From: Eric Blake Message-ID: <56F30C2C.8000704@redhat.com> Date: Wed, 23 Mar 2016 15:35:40 -0600 MIME-Version: 1.0 In-Reply-To: <20160323090944.GB4126@noname.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xjV9w4HLux9cDNfQ9tE6K9OSlQsloJjjx" Subject: Re: [Qemu-devel] [PATCH 03/12] block: Introduce BlockBackendPublic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: berto@igalia.com, qemu-devel@nongnu.org, qemu-block@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xjV9w4HLux9cDNfQ9tE6K9OSlQsloJjjx Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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. :-) True. >>> +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 fo= r > a single commit until something is added there. clang gripes; see commit 83ecb22ba. 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --xjV9w4HLux9cDNfQ9tE6K9OSlQsloJjjx 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/ iQEcBAEBCAAGBQJW8wwsAAoJEKeha0olJ0NqVmIIAIeKmvb4WWmg2SuD19xk0ccC ZrxkkduG99ejHzq7u/4TPuMpcaHc460qzJxZqIntm1/+FJubK+oZL1JmfeEkFAsu /Z/1bmQt9NLCQ5ZjaOCuGznVE2YAyNmyRrNAkyyOBvn/PKNHCrMIPsBAu3R/dcSF 6Tz8RLsVppm2lhYlppS+AZZLBXwWRPv+J7RXpVyR8KjEHza36gQDnvuJgFnFncDw A38qI3y6frglhAefFqA5GDJOWeyMGVbEb78R9B0aEfF7HnMC9cnvdTv3PUujuaMw GTgi73GMTTGhMUr593sFGFSq2HIwTD030BpcXFpcKJx94+cFVmMAxJkbFrAlG68= =H2Z/ -----END PGP SIGNATURE----- --xjV9w4HLux9cDNfQ9tE6K9OSlQsloJjjx--