[PATCH v2] storage: Upgrade default qcow2 version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change the default to modern qcow2 as it's supported by all qemu
versions supported by libvirt and `qemu-img` already defaults to
the new format since QEMU 1.7.

Some Unittests require changes to pass, now that version 1.1 is default.
Unittests like `qcow2-1.1.argv` may not be relevant anymore, but this patch
doesn't affect them.

Signed-off-by: Abhiram Tilak <atp.exp@xxxxxxxxx>
Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/storage/storage_util.c                                      | 2 +-
 .../storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv  | 2 +-
 tests/storagevolxml2argvdata/qcow2-compat.argv                  | 2 +-
 tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv     | 2 +-
 tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv    | 2 +-
 .../qcow2-luks-convert-encrypt2fileqcow2.argv                   | 2 +-
 tests/storagevolxml2argvdata/qcow2-luks.argv                    | 2 +-
 .../qcow2-nobacking-convert-prealloc-compat.argv                | 2 +-
 .../storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv | 2 +-
 .../qcow2-nocapacity-convert-prealloc.argv                      | 2 +-
 tests/storagevolxml2argvdata/qcow2-nocapacity.argv              | 2 +-
 tests/storagevolxml2argvdata/qcow2-nocow-compat.argv            | 2 +-
 tests/storagevolxml2argvdata/qcow2-zerocapacity.argv            | 2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index 7bf815d978..28d5fce4f0 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -765,7 +765,7 @@ storageBackendCreateQemuImgOpts(virStorageEncryptionInfoDef *encinfo,
     if (info->compat)
         virBufferAsprintf(&buf, "compat=%s,", info->compat);
     else if (info->format == VIR_STORAGE_FILE_QCOW2)
-        virBufferAddLit(&buf, "compat=0.10,");
+        virBufferAddLit(&buf, "compat=1.1,");

     if (info->clusterSize > 0)
         virBufferAsprintf(&buf, "cluster_size=%llu,", info->clusterSize);
diff --git a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv
index 4b9ccfe8dc..705604b162 100644
--- a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv
+++ b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv
@@ -1,7 +1,7 @@
 qemu-img \
 create \
 -f qcow2 \
--o compat=0.10 \
+-o compat=1.1 \
 /var/lib/libvirt/images/sparse-qcow2.img \
 1073741824K
 qemu-img \
diff --git a/tests/storagevolxml2argvdata/qcow2-compat.argv b/tests/storagevolxml2argvdata/qcow2-compat.argv
index bf3a50a7f3..40fbe065e0 100644
--- a/tests/storagevolxml2argvdata/qcow2-compat.argv
+++ b/tests/storagevolxml2argvdata/qcow2-compat.argv
@@ -2,6 +2,6 @@ qemu-img \
 create \
 -f qcow2 \
 -b /dev/null \
--o backing_fmt=raw,compat=0.10 \
+-o backing_fmt=raw,compat=1.1 \
 /var/lib/libvirt/images/OtherDemo.img \
 5242880K
diff --git a/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv b/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv
index dbc7deb16a..b68da425d9 100644
--- a/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv
+++ b/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv
@@ -2,6 +2,6 @@ qemu-img \
 convert \
 -f raw \
 -O qcow2 \
--o compat=0.10 \
+-o compat=1.1 \
 /dev/HostVG/Swap \
 /var/lib/libvirt/images/OtherDemo.img
diff --git a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv
index d89622d4a6..3068b4b38d 100644
--- a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv
+++ b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv
@@ -2,7 +2,7 @@ qemu-img \
 create \
 -f qcow2 \
 --object secret,id=OtherDemoLuks.img_encrypt0,file=/path/to/secretFile \
--o encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=0.10 \
+-o encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=1.1 \
 /var/lib/libvirt/images/OtherDemoLuks.img \
 5242880K
 qemu-img \
diff --git a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv
index 4d910552d0..948e9ac66d 100644
--- a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv
+++ b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv
@@ -1,7 +1,7 @@
 qemu-img \
 create \
 -f qcow2 \
--o compat=0.10 \
+-o compat=1.1 \
 /var/lib/libvirt/images/sparse-qcow2.img \
 1073741824K
 qemu-img \
diff --git a/tests/storagevolxml2argvdata/qcow2-luks.argv b/tests/storagevolxml2argvdata/qcow2-luks.argv
index 308316c90c..a3be41a406 100644
--- a/tests/storagevolxml2argvdata/qcow2-luks.argv
+++ b/tests/storagevolxml2argvdata/qcow2-luks.argv
@@ -3,6 +3,6 @@ create \
 -f qcow2 \
 -b /dev/null \
 --object secret,id=OtherDemoLuks.img_encrypt0,file=/path/to/secretFile \
--o backing_fmt=raw,encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=0.10 \
+-o backing_fmt=raw,encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=1.1 \
 /var/lib/libvirt/images/OtherDemoLuks.img \
 5242880K
diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.argv b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.argv
index 463ae26779..a130ed8894 100644
--- a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.argv
+++ b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.argv
@@ -2,6 +2,6 @@ qemu-img \
 convert \
 -f raw \
 -O qcow2 \
--o preallocation=metadata,compat=0.10 \
+-o preallocation=metadata,compat=1.1 \
 /var/lib/libvirt/images/sparse.img \
 /var/lib/libvirt/images/OtherDemo.img
diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv b/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv
index 510e0c13f6..440ad8f122 100644
--- a/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv
+++ b/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv
@@ -1,6 +1,6 @@
 qemu-img \
 create \
 -f qcow2 \
--o preallocation=metadata,compat=0.10 \
+-o preallocation=metadata,compat=1.1 \
 /var/lib/libvirt/images/OtherDemo.img \
 5242880K
diff --git a/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv b/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv
index 0152b1efb6..3bf8613d72 100644
--- a/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv
+++ b/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv
@@ -2,6 +2,6 @@ qemu-img \
 convert \
 -f raw \
 -O qcow2 \
--o preallocation=falloc,compat=0.10 \
+-o preallocation=falloc,compat=1.1 \
 /var/lib/libvirt/images/sparse.img \
 /var/lib/libvirt/images/OtherDemo.img
diff --git a/tests/storagevolxml2argvdata/qcow2-nocapacity.argv b/tests/storagevolxml2argvdata/qcow2-nocapacity.argv
index 047932a559..924c5c6084 100644
--- a/tests/storagevolxml2argvdata/qcow2-nocapacity.argv
+++ b/tests/storagevolxml2argvdata/qcow2-nocapacity.argv
@@ -2,5 +2,5 @@ qemu-img \
 create \
 -f qcow2 \
 -b /dev/null \
--o backing_fmt=raw,compat=0.10 \
+-o backing_fmt=raw,compat=1.1 \
 /var/lib/libvirt/images/OtherDemo.img
diff --git a/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv b/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv
index 4cc7904cfc..ae94e4e588 100644
--- a/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv
+++ b/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv
@@ -2,6 +2,6 @@ qemu-img \
 create \
 -f qcow2 \
 -b /dev/null \
--o backing_fmt=raw,nocow=on,compat=0.10 \
+-o backing_fmt=raw,nocow=on,compat=1.1 \
 /var/lib/libvirt/images/OtherDemo.img \
 5242880K
diff --git a/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv b/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv
index 607c642e6f..05e31509cb 100644
--- a/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv
+++ b/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv
@@ -1,6 +1,6 @@
 qemu-img \
 create \
 -f qcow2 \
--o compat=0.10 \
+-o compat=1.1 \
 /var/lib/libvirt/images/OtherDemo.img \
 0K
--
2.42.1
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux