From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPqPg-0003mT-8W for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:38:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YPqPb-0003RM-8v for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:38:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YPqPb-0003RD-1p for qemu-devel@nongnu.org; Mon, 23 Feb 2015 05:38:51 -0500 Date: Mon, 23 Feb 2015 16:08:33 +0530 From: Amit Shah Message-ID: <20150223103833.GB22859@grmbl.mre> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Yi Wang Cc: kwolf@redhat.com, wang.yi59@zte.com.cn, qemu-devel@nongnu.org, stefanha@redhat.com, quintela@redhat.com On (Mon) 12 Jan 2015 [01:12:41], Yi Wang wrote: > From b119164ba6715f53594facfc4d1022c198852e9d Mon Sep 17 00:00:00 2001 > From: Yi Wang > Date: Mon, 12 Jan 2015 00:05:40 +0800 > Subject: [PATCH] savevm: create snapshot failed when id_str already exits > > Create snapshot failed in this case: > 1) vm has two or more qcow2 disks; > 2) the first disk has snapshot with id_str 1, and the second disk has > snapshots with id_str 2 and 3, for example; > 3) create snapshot using virsh snapshot-create/snapshot-create-as will > fail, 'cause id_str 2 has already existed in disk two. > > The reason is that do_savevm() didn't check id_str before create > bdrv_snapshot_create(), and this patch fixed this. > > Signed-off-by: Yi Wang I'll defer to the block people on this patch. Amit