From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPuKM-00048I-4V for qemu-devel@nongnu.org; Wed, 10 Apr 2013 08:40:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPuKB-0006tA-VW for qemu-devel@nongnu.org; Wed, 10 Apr 2013 08:40:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPuKB-0006t2-NW for qemu-devel@nongnu.org; Wed, 10 Apr 2013 08:40:27 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3ACeQjB019003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Apr 2013 08:40:26 -0400 Date: Wed, 10 Apr 2013 08:40:25 -0400 From: Luiz Capitulino Message-ID: <20130410084025.5db97979@redhat.com> In-Reply-To: <516559EB.8020005@redhat.com> References: <877gkavlw2.fsf@blackfin.pond.sub.org> <516544C3.2060306@redhat.com> <516559EB.8020005@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 00/11] convert savevm to use qapi and introduce qmp command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Pavel Hrdina , Markus Armbruster , qemu-devel@nongnu.org On Wed, 10 Apr 2013 06:24:11 -0600 Eric Blake wrote: > > - If you want to overwrite an existing snapshot, you could specify > > the 'id' or the 'name' argument or both of them and also you will > > have to use the 'force' argument > > But the argument made in this thread is that QMP should _not_ have a > force argument. It should be a flat-out error in QMP to try to create a > snapshot with a conflicting name or tag; preferably with a distinct > error type. Higher-level apps (HMP savevm -f) would try to create; if > -f is not specified, the error is good enough; if -f is specified and > that particular error is returned, then HMP calls delete and then > re-tries the create. No 'force' argument needed at the QMP layer. To avoid adding a new error class, the HMP command could query for the snapshot name and delete it if it exists before creating the snapshot.