qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 4/9] block: vhdx - log support struct and def


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH v2 4/9] block: vhdx - log support struct and defines
Date: Thu, 1 Aug 2013 17:00:05 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]