From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40766) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlHTM-0003uF-7s for qemu-devel@nongnu.org; Fri, 16 May 2014 08:42:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlHTF-0004H4-LJ for qemu-devel@nongnu.org; Fri, 16 May 2014 08:42:48 -0400 Message-ID: <537607B6.1050108@redhat.com> Date: Fri, 16 May 2014 06:42:30 -0600 From: Eric Blake MIME-Version: 1.0 References: <1400163717-1898-1-git-send-email-kwolf@redhat.com> <1400163717-1898-2-git-send-email-kwolf@redhat.com> <5374E217.7090607@redhat.com> <20140516104111.GD4508@noname.redhat.com> In-Reply-To: <20140516104111.GD4508@noname.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="GFrAHLn4ouETMNctGSus9otuuTKjcnSsN" Subject: Re: [Qemu-devel] [PATCH v2 1/5] qcow1: Make padding in the header explicit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: benoit.canet@irqsave.net, ppandit@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, qemu-stable@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --GFrAHLn4ouETMNctGSus9otuuTKjcnSsN Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 05/16/2014 04:41 AM, Kevin Wolf wrote: >>> +} QEMU_PACKED QCowHeader; >> >> Is it worth a compile-time assertion that the correct size is achieved= ? >> >=20 > QEMU_BUILD_BUG_ON() is what you're looking for. Ah, thanks. >=20 > Do you think that would be a useful addition? With packed structs there= > should be little that could make it go wrong. But if we want to add > this, I'd do it in a separate patch and for all image formats. Definitely a separate patch. But yes, I think that it can't hurt - even with packed structs, it's a bit of insurance against someone accidentally adding a field or using a wrong type, particularly for any packed structs where a newer version converts reserved space into a named purpose. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --GFrAHLn4ouETMNctGSus9otuuTKjcnSsN 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 Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTdge2AAoJEKeha0olJ0NqvZIIAJI3QMwwsG3ZYxm3mJvyhq1a j1lHL5gcrVLs05srvrOcXpK8dDky/HUK0BLUcZYp0f4an6MvORpSWR/Zhs8cyW14 sShS35zfPHntRWuDMdGCS+cS73Y73QnJoFBOR9uN/508/Ewa2H+j7OeoRMJNw4K2 LEo0T+afsChEPKBDp2Q7/2ytl82OW72z0I+h5o1nwFqkGGM5f20IXR/kR3px1uN+ sbgs1tyZi8fN5WfydOi1EqroO3m4shcdNPESccU2DbNKrLXdXYiO3/iSpR3Zto3X AGwJ6dFvRzOixUVNl+eDaZ47rrjNa1Te7s606aAup1EMXz1ruhRFX+9obgOuRXA= =nPUp -----END PGP SIGNATURE----- --GFrAHLn4ouETMNctGSus9otuuTKjcnSsN--