]> git.proxmox.com Git - qemu.git/commit - block/vhdx.c
block: vhdx - add region overlap detection for image files
authorJeff Cody <jcody@redhat.com>
Wed, 30 Oct 2013 14:44:46 +0000 (10:44 -0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 7 Nov 2013 12:58:59 +0000 (13:58 +0100)
commit1a848fd4517820981b542e0d10e64c0426414229
tree32830646f081e47e520dcbc1f6a9764bf6c5b8ae
parent0a43a1b5d7c33208120eeb2d98ebb9ab15dc2c87
block: vhdx - add region overlap detection for image files

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 about, but are not required).

This adds the capability to register a region for later checking, and
to check against registered regions for any overlap.

Also, if neither the BAT or Metadata region tables are found, return
error.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/vhdx.c
block/vhdx.h