All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, jcody@redhat.com,
	stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH V7 4/6] qemu-img: add -l for snapshot in convert
Date: Thu, 05 Dec 2013 14:06:05 +0800	[thread overview]
Message-ID: <52A017CD.2020508@linux.vnet.ibm.com> (raw)
In-Reply-To: <529F939F.8020709@redhat.com>

于 2013/12/5 4:42, Eric Blake 写道:
> On 12/04/2013 02:10 AM, Wenchao Xia wrote:
>> Now qemu-img convert have similar options as qemu-nbd for internal
>> snapshot.
>>
>> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
>> ---
>
>> @@ -1183,6 +1189,18 @@ static int img_convert(int argc, char **argv)
>>           case 's':
>>               snapshot_name = optarg;
>>               break;
>> +        case 'l':
>> +            if (strstart(optarg, SNAPSHOT_OPT_BASE, NULL)) {
>> +                sn_opts = qemu_opts_parse(&internal_snapshot_opts, optarg, 0);
>> +                if (!sn_opts) {
>> +                    error_report("Failed in parsing snapshot param '%s'",
>> +                                 optarg);
>> +                    return 1;
>> +                }
>> +            } else {
>> +                snapshot_name = optarg;
>> +            }
>> +            break;
>
> Do we want a followup patch that makes it an error to use -l and -s
> together?  Without such a patch, we have the odd behavior that:
>
> convert -l name1 -s name2
>
> loads name2, but:
>
> convert -l snapshot.name=name1 -s name2
>
> loads name1.  Confusing that the choice of HOW the argument to -l is
> specified determines whether the -s has any impact.
>
> For that matter, why can't '-s' and '-l' be made synonyms of each other?
>   In other words, why not support:
>
> convert -s snapshot.name=name1
>
   Previous I planned to use -l for internal snapshot in all possible
program, since -s is taken as external snapshot in qemu, qemu-nbd.
let -s stands for internal in qemu-img convert only, may bring
confuse to user, so I deprecated it instead of enhance it(I want
to remove it but may bring compatiablity issue).
   Yes, it should report error when both specified, will send a patch
if you agree '-l' should still be used.

  reply	other threads:[~2013-12-05  6:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-04  9:10 [Qemu-devel] [PATCH V7 0/6] export internal snapshot by qemu-nbd Wenchao Xia
2013-12-04  9:10 ` [Qemu-devel] [PATCH V7 1/6] snapshot: distinguish id and name in load_tmp Wenchao Xia
2013-12-04  9:10 ` [Qemu-devel] [PATCH V7 2/6] qemu-nbd: support internal snapshot export Wenchao Xia
2013-12-04  9:10 ` [Qemu-devel] [PATCH V7 3/6] qemu-iotests: add 058 internal snapshot export with qemu-nbd case Wenchao Xia
2014-01-16 12:52   ` Kevin Wolf
2014-01-17  3:00     ` Wenchao Xia
2013-12-04  9:10 ` [Qemu-devel] [PATCH V7 4/6] qemu-img: add -l for snapshot in convert Wenchao Xia
2013-12-04 20:42   ` Eric Blake
2013-12-05  6:06     ` Wenchao Xia [this message]
2013-12-09  3:43       ` Wenchao Xia
2013-12-13 13:44         ` Eric Blake
2013-12-16  2:47           ` Wenchao Xia
2013-12-04  9:10 ` [Qemu-devel] [PATCH V7 5/6] qemu-iotests: add test for snapshot in qemu-img convert Wenchao Xia
2013-12-04  9:10 ` [Qemu-devel] [PATCH V7 6/6] qemu-nbd: add doc for option -f Wenchao Xia
2013-12-04 14:52 ` [Qemu-devel] [PATCH V7 0/6] export internal snapshot by qemu-nbd Stefan Hajnoczi

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=52A017CD.2020508@linux.vnet.ibm.com \
    --to=xiawenc@linux.vnet.ibm.com \
    --cc=eblake@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.