From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54714) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VELc2-0008Be-NY for qemu-devel@nongnu.org; Tue, 27 Aug 2013 11:55:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VELbw-00030v-N7 for qemu-devel@nongnu.org; Tue, 27 Aug 2013 11:55:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VELbw-00030p-GF for qemu-devel@nongnu.org; Tue, 27 Aug 2013 11:55:16 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r7RFtF51025381 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 27 Aug 2013 11:55:15 -0400 From: Kevin Wolf Date: Tue, 27 Aug 2013 17:55:16 +0200 Message-Id: <1377618916-30216-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH v2] qcow2: Change default for new images to compat=1.1 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com 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 --- block/qcow2.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 3376901..6ab3341 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1402,7 +1402,7 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *options) int flags = 0; size_t cluster_size = DEFAULT_CLUSTER_SIZE; int prealloc = 0; - int version = 2; + int version = 3; /* Read out options */ while (options && options->name) { @@ -1429,7 +1429,9 @@ static int qcow2_create(const char *filename, QEMUOptionParameter *options) return -EINVAL; } } else if (!strcmp(options->name, BLOCK_OPT_COMPAT_LEVEL)) { - if (!options->value.s || !strcmp(options->value.s, "0.10")) { + if (!options->value.s) { + /* keep the default */ + } else if (!strcmp(options->value.s, "0.10")) { version = 2; } else if (!strcmp(options->value.s, "1.1")) { version = 3; -- 1.8.1.4