From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPVpI-0006jl-8Z for qemu-devel@nongnu.org; Thu, 04 Sep 2014 08:07:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XPVpD-0005jy-Ap for qemu-devel@nongnu.org; Thu, 04 Sep 2014 08:07:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38115) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XPVpD-0005jt-1Y for qemu-devel@nongnu.org; Thu, 04 Sep 2014 08:07:39 -0400 Message-ID: <54085604.2050005@redhat.com> Date: Thu, 04 Sep 2014 06:07:32 -0600 From: Eric Blake MIME-Version: 1.0 References: <1409821121-20645-1-git-send-email-stefanha@redhat.com> In-Reply-To: <1409821121-20645-1-git-send-email-stefanha@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NmFdepPLV4WFc4TVkSeNFsDArnVQLiR42" Subject: Re: [Qemu-devel] [PATCH] cow: make padding in the header explicit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf , shhuiw@163.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --NmFdepPLV4WFc4TVkSeNFsDArnVQLiR42 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/04/2014 02:58 AM, Stefan Hajnoczi wrote: > On-disk structures should be marked packed so the compiler does not > insert padding for field alignment. Padding should be explicit so > on-disk layout is obvious and we don't rely on the architecture-specifi= c > ABI for alignment rules. >=20 > The pahole(1) diff shows that the padding is now explicit and offsets > are unchanged: >=20 > char backing_file[1024]; /* 8 1024 */ > /* --- cacheline 16 boundary (1024 bytes) was 8 bytes ago --- */ > int32_t mtime; /* 1032 4 */ > - > - /* XXX 4 bytes hole, try to pack */ > - > + uint32_t padding; /* 1036 4 */ > uint64_t size; /* 1040 8 */ Was a 32-bit build also inserting this padding, or do we have historical differences where 32-bit and 64-bit cow files are actually different, and we may need to be prepared to parse files from both sources? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --NmFdepPLV4WFc4TVkSeNFsDArnVQLiR42 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 iQEcBAEBCAAGBQJUCFYEAAoJEKeha0olJ0Nq2kMH+wWi/GKdQsFUE7PtjicJzMpu S6nm3ZtsaKAYitlJBpmFruZ3E5hD5QR8ogjCzgbgwK8mAtoIkpqpQx88uAlIgTnZ 2O9dVj5SQQQ/cLLpjLcdT28ez2NRC0LV96jR7tMr9wHJLSEpQFafGgKTD3bXWq8E V3I4zly03hbSVyJOBG0I2zdVJPDwltdUgCG0SIp5ImBuk0Fa3HUG5Ao9usTEb/JG ukeHtivzWIxWXwLjNBASKTN6dksvm+j9z2WhUcdHK0LCWSDnFMD6MJtsE/bNqWh9 WhDQC081cT7ncVngzr0/jxtR5v4mM7EFrkgLfgdD3msi17bhD3kAUWSKtAQfixQ= =cOwG -----END PGP SIGNATURE----- --NmFdepPLV4WFc4TVkSeNFsDArnVQLiR42--