qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, peter.maydell@linaro.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PULL 6/6] qcow2: Allow -o compat=v3 during qemu-img amend
Date: Mon,  8 Jul 2019 16:18:12 +0200	[thread overview]
Message-ID: <20190708141812.3974-7-kwolf@redhat.com> (raw)
In-Reply-To: <20190708141812.3974-1-kwolf@redhat.com>

From: Eric Blake <eblake@redhat.com>

Commit b76b4f60 allowed '-o compat=v3' as an alias for the
less-appealing '-o compat=1.1' for 'qemu-img create' since we want to
use the QMP form as much as possible, but forgot to do likewise for
qemu-img amend.  Also, it doesn't help that '-o help' doesn't list our
new preferred spellings.

Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
 block/qcow2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/qcow2.c b/block/qcow2.c
index 2a59eb27fe..039bdc2f7e 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -4823,9 +4823,9 @@ static int qcow2_amend_options(BlockDriverState *bs, QemuOpts *opts,
             compat = qemu_opt_get(opts, BLOCK_OPT_COMPAT_LEVEL);
             if (!compat) {
                 /* preserve default */
-            } else if (!strcmp(compat, "0.10")) {
+            } else if (!strcmp(compat, "0.10") || !strcmp(compat, "v2")) {
                 new_version = 2;
-            } else if (!strcmp(compat, "1.1")) {
+            } else if (!strcmp(compat, "1.1") || !strcmp(compat, "v3")) {
                 new_version = 3;
             } else {
                 error_setg(errp, "Unknown compatibility level %s", compat);
@@ -5098,7 +5098,7 @@ static QemuOptsList qcow2_create_opts = {
         {
             .name = BLOCK_OPT_COMPAT_LEVEL,
             .type = QEMU_OPT_STRING,
-            .help = "Compatibility level (0.10 or 1.1)"
+            .help = "Compatibility level (v2 [0.10] or v3 [1.1])"
         },
         {
             .name = BLOCK_OPT_BACKING_FILE,
-- 
2.20.1



  parent reply	other threads:[~2019-07-08 14:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-08 14:18 [Qemu-devel] [PULL 0/6] Block layer patches Kevin Wolf
2019-07-08 14:18 ` [Qemu-devel] [PULL 1/6] vl: add qemu_add_vm_change_state_handler_prio() Kevin Wolf
2019-07-08 14:18 ` [Qemu-devel] [PULL 2/6] qdev: add qdev_add_vm_change_state_handler() Kevin Wolf
2019-07-08 14:18 ` [Qemu-devel] [PULL 3/6] virtio-scsi: restart DMA after iothread Kevin Wolf
2019-07-08 14:18 ` [Qemu-devel] [PULL 4/6] block/qcow: Improve error when opening qcow2 files as qcow Kevin Wolf
2019-07-08 14:18 ` [Qemu-devel] [PULL 5/6] MAINTAINERS: update RBD block maintainer Kevin Wolf
2019-07-08 14:18 ` Kevin Wolf [this message]
2019-07-08 15:12 ` [Qemu-devel] [PULL 0/6] Block layer patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190708141812.3974-7-kwolf@redhat.com \
    --to=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).