qcow2: Basic definitions for external data files

This adds basic constants, struct fields and helper function for
external data file support to the implementation.

QCOW2_INCOMPAT_MASK and QCOW2_AUTOCLEAR_MASK are not updated yet so that
opening images with an external data file still fails (we don't handle
them correctly yet).

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Kevin Wolf 2019-01-14 16:48:25 +01:00
parent 65a3d073e9
commit 93c2493646
5 changed files with 43 additions and 22 deletions

View file

@ -26,7 +26,7 @@ header_length 104
Header extension:
magic 0x6803f857
length 144
length 192
data <binary>
magic 0x514649fb
@ -84,7 +84,7 @@ header_length 104
Header extension:
magic 0x6803f857
length 144
length 192
data <binary>
magic 0x514649fb
@ -144,7 +144,7 @@ header_length 104
Header extension:
magic 0x6803f857
length 144
length 192
data <binary>
ERROR cluster 5 refcount=0 reference=1
@ -199,7 +199,7 @@ header_length 104
Header extension:
magic 0x6803f857
length 144
length 192
data <binary>
magic 0x514649fb
@ -268,7 +268,7 @@ header_length 104
Header extension:
magic 0x6803f857
length 144
length 192
data <binary>
read 65536/65536 bytes at offset 44040192
@ -306,7 +306,7 @@ header_length 104
Header extension:
magic 0x6803f857
length 144
length 192
data <binary>
ERROR cluster 5 refcount=0 reference=1
@ -335,7 +335,7 @@ header_length 104
Header extension:
magic 0x6803f857
length 144
length 192
data <binary>
read 131072/131072 bytes at offset 0