Re: [Qemu-devel] [PATCH v6 09/20] block: vhdx - add region overlap detection for image files

2013-10-01 Thread Stefan Hajnoczi
On Wed, Sep 25, 2013 at 05:02:54PM -0400, Jeff Cody wrote: +/* Check for region overlaps inside the VHDX image */ +static int vhdx_region_check(BDRVVHDXState *s, uint64_t start, uint64_t length) +{ +int ret = 0; +uint64_t end; +VHDXRegionEntry *r; + +end = start + length;

Re: [Qemu-devel] [PATCH v6 09/20] block: vhdx - add region overlap detection for image files

2013-10-01 Thread Jeff Cody
On Tue, Oct 01, 2013 at 01:42:18PM +0200, Stefan Hajnoczi wrote: On Wed, Sep 25, 2013 at 05:02:54PM -0400, Jeff Cody wrote: +/* Check for region overlaps inside the VHDX image */ +static int vhdx_region_check(BDRVVHDXState *s, uint64_t start, uint64_t length) +{ +int ret = 0; +

[Qemu-devel] [PATCH v6 09/20] block: vhdx - add region overlap detection for image files

2013-09-25 Thread Jeff Cody
Regions in the image file cannot overlap - the log, region tables, and metdata must all be unique and non-overlapping. This adds region checking by means of a QLIST; there can be a variable number of regions and metadata (there may be metadata or region tables that we do not recognize / know