On Wed, Jul 31, 2013 at 11:23:49PM -0400, Jeff Cody wrote: > @@ -318,6 +323,18 @@ typedef struct VHDXMetadataEntries { > uint16_t present; > } VHDXMetadataEntries; > > +typedef struct VHDXLogEntries { > + uint64_t offset; > + uint64_t length; > + uint32_t head; > + uint32_t tail; > +} VHDXLogEntries; > + > +typedef struct VHDXLogEntryInfo { > + uint64_t sector_start; > + uint32_t desc_count; > +} VHDXLogEntryInfo;
An array of VHDXLogEntryInfo structs would be affected by alignment on x86_64. &a[1] != (void*)a + sizeof(VHDXLogEntryInfo). IMO all on-disk structs should be QEMU_PACKED for safety.