From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33696 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ofvjw-0007r5-R1 for qemu-devel@nongnu.org; Mon, 02 Aug 2010 10:11:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ofvju-0002j3-NA for qemu-devel@nongnu.org; Mon, 02 Aug 2010 10:11:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7801) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ofvju-0002il-GU for qemu-devel@nongnu.org; Mon, 02 Aug 2010 10:11:38 -0400 Date: Mon, 2 Aug 2010 10:08:56 -0400 From: Chris Lalancette Subject: Re: [Qemu-devel] [PATCH 3/3] savevm: prevent snapshot overwriting and generate a default name Message-ID: <20100802140855.GE2838@localhost.localdomain> References: <1280345424-12918-1-git-send-email-miguel.filho@gmail.com> <1280345424-12918-4-git-send-email-miguel.filho@gmail.com> <20100730104301.50b3f1a1@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100730104301.50b3f1a1@redhat.com> Reply-To: Chris Lalancette List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: kwolf@redhat.com, clalance@redhat.com, Miguel Di Ciurcio Filho , Markus Armbruster , qemu-devel@nongnu.org On 07/30/10 - 10:43:01AM, Luiz Capitulino wrote: > On Fri, 30 Jul 2010 11:34:57 +0200 > Markus Armbruster wrote: > > > Miguel Di Ciurcio Filho writes: > > > > > This patch address two issues. > > > > > > 1) When savevm is run using an previously saved snapshot id or name, it will > > > delete the original and create a new one, using the same id and name and not > > > prompting the user of what just happened. > > > > > > This behaviour is not good, IMHO. > > > > Debatable. > > Automatically destroying previously saved data without any notice seems > a quite bad behavior to me. > > > > We add a '-f' parameter to savevm, to really force that to happen, in case the > > > user really wants to. > > > > Incompatible change, looks like it'll break libvirt. Doesn't mean we > > can't do it ever, but right now may not be the best time. Perhaps after > > savevm & friends are fully functional in QMP. > > Chris, could you please check whether this impacts libvirt? Sorry for the delay here. As far as libvirt is concerned, this won't break the functionality, just change the semantics. If you only ever do snapshots through libvirt, then we can never run into this situation; libvirt prevents 2 snapshots from having the same name. Today, if you do a mixture of snapshots through the monitor and snapshots through libvirt, and you name them the same, then libvirt *could* silently override the old one. After this patch, the savevm will fail (which libvirt will gracefully handle. In any case, it's a corner case that libvirt will never intentionally put itself into, so either way is fine with me. (I also tend to think that overwriting data without any notification isn't very nice, but I also understand that this is a change in semantics) -- Chris Lalancette