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: Jeff Cody
Subject: Re: [Qemu-devel] [PATCH v2 4/9] block: vhdx - log support struct and defines
Date: Thu, 1 Aug 2013 11:51:08 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Aug 01, 2013 at 05:00:05PM +0200, Stefan Hajnoczi wrote:
> 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.

Neither of the two structs above reflect on-disk structs (actually
VHDXLogEntryInfo is currently unused, so I should drop it from this
patch).

I should mention this in the commit message, since the patch context
isn't enough to show it, but the structs introduced in this patch are
below a comment demarcation line that calls out an end to the on-disk
structs:

/* ----- END VHDX SPECIFICATION STRUCTURES ---- */



reply via email to

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