From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56318) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsOE6-0007ay-8O for qemu-devel@nongnu.org; Sun, 15 Dec 2013 21:48:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VsODx-0004FC-AW for qemu-devel@nongnu.org; Sun, 15 Dec 2013 21:48:10 -0500 Received: from e28smtp03.in.ibm.com ([122.248.162.3]:50202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VsODw-0004E3-L2 for qemu-devel@nongnu.org; Sun, 15 Dec 2013 21:48:01 -0500 Received: from /spool/local by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 16 Dec 2013 08:17:57 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp01.in.ibm.com (Postfix) with ESMTP id 9BC1FE0024 for ; Mon, 16 Dec 2013 08:20:19 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rBG2lpkg54067392 for ; Mon, 16 Dec 2013 08:17:51 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rBG2lsd7031113 for ; Mon, 16 Dec 2013 08:17:54 +0530 Message-ID: <52AE69DE.1000702@linux.vnet.ibm.com> Date: Mon, 16 Dec 2013 10:47:58 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1386148259-10962-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1386148259-10962-5-git-send-email-xiawenc@linux.vnet.ibm.com> <529F939F.8020709@redhat.com> <52A017CD.2020508@linux.vnet.ibm.com> <52A53C49.4000601@linux.vnet.ibm.com> <52AB0F2C.5030703@redhat.com> In-Reply-To: <52AB0F2C.5030703@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V7 4/6] qemu-img: add -l for snapshot in convert List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: kwolf@redhat.com, pbonzini@redhat.com, jcody@redhat.com, stefanha@redhat.com 于 2013/12/13 21:44, Eric Blake 写道: > On 12/08/2013 08:43 PM, Wenchao Xia wrote: >>>> >>>> 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. > > Consistency in command line options between different tools is nice, but > is less important than adding functionality. I'm perfectly fine if we > use -l in one tool and -s in another, as long as the documentation is > clear on how to spell the option for the tool I want to use. > >>> 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. >>> >>> >> Eric, I hope to get your idea before patching, any comments? >> > > My biggest concern was that by adding -l as a superset of -s, but not > taking care of the relation between the two, you created odd command > line usage patterns. For qemu-img, it may be simpler to just make -s do > everything, instead of trying to deprecate it (that is, adding -l for > consistency with other tools while breaking -s isn't nice). > OK, there is still one cornor case to consider: -s snapshot.name=name1 It may change the semantics if a caller used qemu-img convert as above before, although it seems insane.:)