[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC] xen-block: correctly define structures in public headers
>>> On 03.12.13 at 11:57, Roger Pau Monne <roger.pau@xxxxxxxxxx> wrote: > struct blkif_request_rw { > uint8_t nr_segments; /* number of segments */ > blkif_vdev_t handle; /* only for read/write requests */ > -#ifdef CONFIG_X86_64 > - uint32_t _pad1; /* offsetof(blkif_request,u.rw.id) == 8 */ > -#endif > uint64_t id; /* private guest value, echoed in resp */ > blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */ > struct blkif_request_segment { > @@ -157,47 +154,36 @@ struct blkif_request_rw { > /* @last_sect: last sector in frame to transfer (inclusive). > */ > uint8_t first_sect, last_sect; > } seg[BLKIF_MAX_SEGMENTS_PER_REQUEST]; > -} __attribute__((__packed__)); > +}; Removing the packed attribute here and below is not possible as long as the defined structures get used in struct blkif_request as the second field after a uint8_t one, and as long as the individual fields here aren't natively aligned. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |