yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-qcow2-change-default-for-new-images-to-compat-1.1-pa.patch

9ae3a8
From 05ce2d88bccb8c43141ff2f03795c505eff247b8 Mon Sep 17 00:00:00 2001
9ae3a8
From: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Date: Fri, 22 Nov 2013 14:23:30 +0100
9ae3a8
Subject: [PATCH 12/14] qcow2: change default for new images to compat=1.1, part2
9ae3a8
9ae3a8
RH-Author: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Message-id: <1385130210-31063-3-git-send-email-kwolf@redhat.com>
9ae3a8
Patchwork-id: 55857
9ae3a8
O-Subject: [RHEL-7.0 qemu-kvm PATCH 2/2] qcow2: Change default for new images to compat=1.1
9ae3a8
Bugzilla: 1026739
9ae3a8
RH-Acked-by: Max Reitz <mreitz@redhat.com>
9ae3a8
RH-Acked-by: Fam Zheng <famz@redhat.com>
9ae3a8
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
9ae3a8
9ae3a8
By the time that qemu 1.7 will be released, enough time will have passed
9ae3a8
since qemu 1.1, which is the first version to understand version 3
9ae3a8
images, that changing the default shouldn't hurt many people any more
9ae3a8
and the benefits of using the new format outweigh the pain.
9ae3a8
9ae3a8
qemu-iotests already runs with compat=1.1 by default.
9ae3a8
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
Reviewed-by: Eric Blake <eblake@redhat.com>
9ae3a8
(cherry picked from commit 9117b47717ad208b12786ce88eacb013f9b3dd1c)
9ae3a8
9ae3a8
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
9ae3a8
---
9ae3a8
 block/qcow2.c | 4 +++-
9ae3a8
 1 file changed, 3 insertions(+), 1 deletion(-)
9ae3a8
9ae3a8
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
9ae3a8
---
9ae3a8
 block/qcow2.c |    4 +++-
9ae3a8
 1 files changed, 3 insertions(+), 1 deletions(-)
9ae3a8
9ae3a8
diff --git a/block/qcow2.c b/block/qcow2.c
9ae3a8
index 897e48a..850d1c2 100644
9ae3a8
--- a/block/qcow2.c
9ae3a8
+++ b/block/qcow2.c
9ae3a8
@@ -1627,7 +1627,9 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *options,
9ae3a8
                 return -EINVAL;
9ae3a8
             }
9ae3a8
         } else if (!strcmp(options->name, BLOCK_OPT_COMPAT_LEVEL)) {
9ae3a8
-            if (!options->value.s || !strcmp(options->value.s, "0.10")) {
9ae3a8
+            if (!options->value.s) {
9ae3a8
+                /* keep the default */
9ae3a8
+            } else if (!strcmp(options->value.s, "0.10")) {
9ae3a8
                 version = 2;
9ae3a8
             } else if (!strcmp(options->value.s, "1.1")) {
9ae3a8
                 version = 3;
9ae3a8
-- 
9ae3a8
1.7.1
9ae3a8