diff options
author | Max Reitz <mreitz@redhat.com> | 2013-08-30 14:34:25 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2013-08-30 15:48:43 +0200 |
commit | a40f1c2add4d5f58d594f810fe36cabcf32bc4b0 (patch) | |
tree | 8ebc954d9b21e138c0f06bca4f806d66e40bdc82 /include | |
parent | 69c98726537627e708abb8fcb33e3a2b10e40bf1 (diff) |
qcow2: Metadata overlap checks
Two new functions are added; the first one checks a given range in the
image file for overlaps with metadata (main header, L1 tables, L2
tables, refcount table and blocks).
The second one should be used immediately before writing to the image
file as it calls the first function and, upon collision, marks the
image as corrupt and makes the BDS unusable, thereby preventing
further access.
Both functions take a bitmask argument specifying the structures which
should be checked for overlaps, making it possible to also check
metadata writes against colliding with other structures.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/monitor/monitor.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 1942cc42fe..10fa0e390c 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -48,6 +48,7 @@ typedef enum MonitorEvent { QEVENT_BALLOON_CHANGE, QEVENT_SPICE_MIGRATE_COMPLETED, QEVENT_GUEST_PANICKED, + QEVENT_BLOCK_IMAGE_CORRUPTED, /* Add to 'monitor_event_names' array in monitor.c when * defining new events here */ |