[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V7 4/6] qemu-img: add -l for snapshot in convert
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH V7 4/6] qemu-img: add -l for snapshot in convert |
Date: |
Wed, 04 Dec 2013 13:42:07 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
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 <address@hidden>
> ---
> @@ -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
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH V7 0/6] export internal snapshot by qemu-nbd, Wenchao Xia, 2013/12/04
- [Qemu-devel] [PATCH V7 2/6] qemu-nbd: support internal snapshot export, Wenchao Xia, 2013/12/04
- [Qemu-devel] [PATCH V7 3/6] qemu-iotests: add 058 internal snapshot export with qemu-nbd case, Wenchao Xia, 2013/12/04
- [Qemu-devel] [PATCH V7 1/6] snapshot: distinguish id and name in load_tmp, Wenchao Xia, 2013/12/04
- [Qemu-devel] [PATCH V7 5/6] qemu-iotests: add test for snapshot in qemu-img convert, Wenchao Xia, 2013/12/04
- [Qemu-devel] [PATCH V7 4/6] qemu-img: add -l for snapshot in convert, Wenchao Xia, 2013/12/04
- Re: [Qemu-devel] [PATCH V7 4/6] qemu-img: add -l for snapshot in convert,
Eric Blake <=
[Qemu-devel] [PATCH V7 6/6] qemu-nbd: add doc for option -f, Wenchao Xia, 2013/12/04
Re: [Qemu-devel] [PATCH V7 0/6] export internal snapshot by qemu-nbd, Stefan Hajnoczi, 2013/12/04