qcow2: introduce dirty bit

This patch adds an incompatible feature bit to mark images that have not
been closed cleanly.  When a dirty image file is opened a consistency
check and repair is performed.

Update qemu-iotests 031 and 036 since the extension header size changes
when we add feature bit table entries.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Stefan Hajnoczi 2012-07-27 09:05:19 +01:00 committed by Kevin Wolf
parent 0f6d767aa8
commit c61d0004bc
4 changed files with 67 additions and 15 deletions

View file

@ -54,8 +54,8 @@ header_length 72
Header extension:
magic 0x6803f857
length 0
data ''
length 48
data <binary>
Header extension:
magic 0x12345678
@ -68,7 +68,7 @@ No errors were found on the image.
magic 0x514649fb
version 2
backing_file_offset 0x98
backing_file_offset 0xc8
backing_file_size 0x17
cluster_bits 16
size 67108864
@ -92,8 +92,8 @@ data 'host_device'
Header extension:
magic 0x6803f857
length 0
data ''
length 48
data <binary>
Header extension:
magic 0x12345678
@ -155,8 +155,8 @@ header_length 104
Header extension:
magic 0x6803f857
length 0
data ''
length 48
data <binary>
Header extension:
magic 0x12345678
@ -169,7 +169,7 @@ No errors were found on the image.
magic 0x514649fb
version 3
backing_file_offset 0xb8
backing_file_offset 0xe8
backing_file_size 0x17
cluster_bits 16
size 67108864
@ -193,8 +193,8 @@ data 'host_device'
Header extension:
magic 0x6803f857
length 0
data ''
length 48
data <binary>
Header extension:
magic 0x12345678

View file

@ -46,7 +46,7 @@ header_length 104
Header extension:
magic 0x6803f857
length 0
data ''
length 48
data <binary>
*** done