<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">From 05ce2d88bccb8c43141ff2f03795c505eff247b8 Mon Sep 17 00:00:00 2001
From: Kevin Wolf &lt;kwolf@redhat.com&gt;
Date: Fri, 22 Nov 2013 14:23:30 +0100
Subject: [PATCH 12/14] qcow2: change default for new images to compat=1.1, part2

RH-Author: Kevin Wolf &lt;kwolf@redhat.com&gt;
Message-id: &lt;1385130210-31063-3-git-send-email-kwolf@redhat.com&gt;
Patchwork-id: 55857
O-Subject: [RHEL-7.0 qemu-kvm PATCH 2/2] qcow2: Change default for new images to compat=1.1
Bugzilla: 1026739
RH-Acked-by: Max Reitz &lt;mreitz@redhat.com&gt;
RH-Acked-by: Fam Zheng &lt;famz@redhat.com&gt;
RH-Acked-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;

By the time that qemu 1.7 will be released, enough time will have passed
since qemu 1.1, which is the first version to understand version 3
images, that changing the default shouldn't hurt many people any more
and the benefits of using the new format outweigh the pain.

qemu-iotests already runs with compat=1.1 by default.

Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
(cherry picked from commit 9117b47717ad208b12786ce88eacb013f9b3dd1c)

Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
---
 block/qcow2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Signed-off-by: Miroslav Rezanina &lt;mrezanin@redhat.com&gt;
---
 block/qcow2.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/block/qcow2.c b/block/qcow2.c
index 897e48a..850d1c2 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1627,7 +1627,9 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *options,
                 return -EINVAL;
             }
         } else if (!strcmp(options-&gt;name, BLOCK_OPT_COMPAT_LEVEL)) {
-            if (!options-&gt;value.s || !strcmp(options-&gt;value.s, "0.10")) {
+            if (!options-&gt;value.s) {
+                /* keep the default */
+            } else if (!strcmp(options-&gt;value.s, "0.10")) {
                 version = 2;
             } else if (!strcmp(options-&gt;value.s, "1.1")) {
                 version = 3;
-- 
1.7.1

</pre></body></html>