mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-18 23:52:14 -06:00
qcow2: Write feature table only for v3 images
Version 2 images don't have feature bits, so writing a feature table to those images is kind of pointless. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
80c71a241a
commit
1a4828c793
3 changed files with 26 additions and 49 deletions
|
@ -1895,6 +1895,7 @@ int qcow2_update_header(BlockDriverState *bs)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Feature table */
|
/* Feature table */
|
||||||
|
if (s->qcow_version >= 3) {
|
||||||
Qcow2Feature features[] = {
|
Qcow2Feature features[] = {
|
||||||
{
|
{
|
||||||
.type = QCOW2_FEAT_TYPE_INCOMPATIBLE,
|
.type = QCOW2_FEAT_TYPE_INCOMPATIBLE,
|
||||||
|
@ -1920,6 +1921,7 @@ int qcow2_update_header(BlockDriverState *bs)
|
||||||
}
|
}
|
||||||
buf += ret;
|
buf += ret;
|
||||||
buflen -= ret;
|
buflen -= ret;
|
||||||
|
}
|
||||||
|
|
||||||
/* Keep unknown header extensions */
|
/* Keep unknown header extensions */
|
||||||
QLIST_FOREACH(uext, &s->unknown_header_ext, next) {
|
QLIST_FOREACH(uext, &s->unknown_header_ext, next) {
|
||||||
|
|
|
@ -52,11 +52,6 @@ autoclear_features 0x0
|
||||||
refcount_order 4
|
refcount_order 4
|
||||||
header_length 72
|
header_length 72
|
||||||
|
|
||||||
Header extension:
|
|
||||||
magic 0x6803f857
|
|
||||||
length 144
|
|
||||||
data <binary>
|
|
||||||
|
|
||||||
Header extension:
|
Header extension:
|
||||||
magic 0x12345678
|
magic 0x12345678
|
||||||
length 31
|
length 31
|
||||||
|
@ -68,7 +63,7 @@ No errors were found on the image.
|
||||||
|
|
||||||
magic 0x514649fb
|
magic 0x514649fb
|
||||||
version 2
|
version 2
|
||||||
backing_file_offset 0x128
|
backing_file_offset 0x90
|
||||||
backing_file_size 0x17
|
backing_file_size 0x17
|
||||||
cluster_bits 16
|
cluster_bits 16
|
||||||
size 67108864
|
size 67108864
|
||||||
|
@ -90,11 +85,6 @@ magic 0xe2792aca
|
||||||
length 11
|
length 11
|
||||||
data 'host_device'
|
data 'host_device'
|
||||||
|
|
||||||
Header extension:
|
|
||||||
magic 0x6803f857
|
|
||||||
length 144
|
|
||||||
data <binary>
|
|
||||||
|
|
||||||
Header extension:
|
Header extension:
|
||||||
magic 0x12345678
|
magic 0x12345678
|
||||||
length 31
|
length 31
|
||||||
|
|
|
@ -43,11 +43,6 @@ autoclear_features 0x0
|
||||||
refcount_order 4
|
refcount_order 4
|
||||||
header_length 72
|
header_length 72
|
||||||
|
|
||||||
Header extension:
|
|
||||||
magic 0x6803f857
|
|
||||||
length 144
|
|
||||||
data <binary>
|
|
||||||
|
|
||||||
read 131072/131072 bytes at offset 0
|
read 131072/131072 bytes at offset 0
|
||||||
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
No errors were found on the image.
|
No errors were found on the image.
|
||||||
|
@ -105,11 +100,6 @@ autoclear_features 0x0
|
||||||
refcount_order 4
|
refcount_order 4
|
||||||
header_length 72
|
header_length 72
|
||||||
|
|
||||||
Header extension:
|
|
||||||
magic 0x6803f857
|
|
||||||
length 144
|
|
||||||
data <binary>
|
|
||||||
|
|
||||||
read 131072/131072 bytes at offset 0
|
read 131072/131072 bytes at offset 0
|
||||||
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
128 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
||||||
No errors were found on the image.
|
No errors were found on the image.
|
||||||
|
@ -155,11 +145,6 @@ autoclear_features 0x0
|
||||||
refcount_order 4
|
refcount_order 4
|
||||||
header_length 72
|
header_length 72
|
||||||
|
|
||||||
Header extension:
|
|
||||||
magic 0x6803f857
|
|
||||||
length 144
|
|
||||||
data <binary>
|
|
||||||
|
|
||||||
No errors were found on the image.
|
No errors were found on the image.
|
||||||
|
|
||||||
=== Testing version upgrade and resize ===
|
=== Testing version upgrade and resize ===
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue