qcow2: Add refcount_bits to format-specific info
Add the bit width of every refcount entry to the format-specific
information.
In contrast to lazy_refcounts and the corrupt flag, this should be
always emitted, even for compat=0.10 although it does not support any
refcount width other than 16 bits. This is because if a boolean is
optional, one normally assumes it to be false when omitted; but if an
integer is not specified, it is rather difficult to guess its value.
This new field breaks some test outputs, fix them.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
diff --git a/tests/qemu-iotests/067.out b/tests/qemu-iotests/067.out
index 00b3eae..6ff41bc 100644
--- a/tests/qemu-iotests/067.out
+++ b/tests/qemu-iotests/067.out
@@ -32,6 +32,7 @@
"data": {
"compat": "1.1",
"lazy-refcounts": false,
+ "refcount-bits": 16,
"corrupt": false
}
},
@@ -208,6 +209,7 @@
"data": {
"compat": "1.1",
"lazy-refcounts": false,
+ "refcount-bits": 16,
"corrupt": false
}
},
@@ -414,6 +416,7 @@
"data": {
"compat": "1.1",
"lazy-refcounts": false,
+ "refcount-bits": 16,
"corrupt": false
}
},
@@ -599,6 +602,7 @@
"data": {
"compat": "1.1",
"lazy-refcounts": false,
+ "refcount-bits": 16,
"corrupt": false
}
},
@@ -710,6 +714,7 @@
"data": {
"compat": "1.1",
"lazy-refcounts": false,
+ "refcount-bits": 16,
"corrupt": false
}
},