Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-03-24 Thread Stefan Hajnoczi
On Thu, Mar 12, 2015 at 11:29:38PM +0800, Yi Wang wrote: How about this? From 913cf2cd04167b7f6b892ac1ab405a617d886b97 Mon Sep 17 00:00:00 2001 From: Yi Wang up2w...@gmail.com Date: Thu, 12 Mar 2015 22:54:42 +0800 Subject: [PATCH] savevm: create snapshot failed when id_str already exists

Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-03-12 Thread Yi Wang
How about this? From 913cf2cd04167b7f6b892ac1ab405a617d886b97 Mon Sep 17 00:00:00 2001 From: Yi Wang up2w...@gmail.com Date: Thu, 12 Mar 2015 22:54:42 +0800 Subject: [PATCH] savevm: create snapshot failed when id_str already exists The command virsh create will fail in such condition: vm has two

Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-03-11 Thread Stefan Hajnoczi
On Tue, Mar 10, 2015 at 02:48:46PM +0100, Kevin Wolf wrote: Am 10.03.2015 um 14:28 hat Stefan Hajnoczi geschrieben: On Mon, Mar 09, 2015 at 09:32:47PM +0800, Yi Wang wrote: This will trigger the problem: vda has snapshot s1 with id 1, vdb doesn't have s1 but has snapshot s2 with id 1。When

Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-03-10 Thread Kevin Wolf
Am 10.03.2015 um 14:28 hat Stefan Hajnoczi geschrieben: On Mon, Mar 09, 2015 at 09:32:47PM +0800, Yi Wang wrote: This will trigger the problem: vda has snapshot s1 with id 1, vdb doesn't have s1 but has snapshot s2 with id 1。When we want to run command virsh create s1,

Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-03-10 Thread Stefan Hajnoczi
On Mon, Mar 09, 2015 at 09:32:47PM +0800, Yi Wang wrote: This will trigger the problem: vda has snapshot s1 with id 1, vdb doesn't have s1 but has snapshot s2 with id 1。When we want to run command virsh create s1, del_existing_snapshots() only deletes s1 in vda, and bdrv_snapshot_create()

Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-03-09 Thread Yi Wang
This will trigger the problem: vda has snapshot s1 with id 1, vdb doesn't have s1 but has snapshot s2 with id 1。When we want to run command virsh create s1, del_existing_snapshots() only deletes s1 in vda, and bdrv_snapshot_create() tries to create vdb's snapshot s1 with id 1, but id 1 alreay

Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-03-06 Thread Yi Wang
Yeah, your method is better. But there is still a little problem. For example: vda has one snapshot with name s1 and id_str 1, vdb has two snapshots: first name s1 and id_str 2; second name s2 and id_str 3. Error will occur when we want to create snapshot s1, because snapshot s1 with id_str 2

Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-03-06 Thread Stefan Hajnoczi
On Fri, Mar 06, 2015 at 10:35:41PM +0800, Yi Wang wrote: Yeah, your method is better. But there is still a little problem. For example: vda has one snapshot with name s1 and id_str 1, vdb has two snapshots: first name s1 and id_str 2; second name s2 and id_str 3. Error will occur when we want

Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-03-05 Thread Stefan Hajnoczi
On Thu, Mar 05, 2015 at 09:05:52PM +0800, Yi Wang wrote: Thanks for your reply and Happy Lantern Festival! I am afraid you misunderstood what I mean, maybe I didn't express clearly :-) My patch works in such case: Firstly vm has two disks: [root@fox-host vmimg]# virsh domblklist win7 Target

Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-03-05 Thread Yi Wang
Thanks for your reply and Happy Lantern Festival! I am afraid you misunderstood what I mean, maybe I didn't express clearly :-) My patch works in such case: Firstly vm has two disks: [root@fox-host vmimg]# virsh domblklist win7 Target Source hdb

Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-02-25 Thread Stefan Hajnoczi
On Mon, Jan 12, 2015 at 01:12:41AM +0800, Yi Wang wrote: From b119164ba6715f53594facfc4d1022c198852e9d Mon Sep 17 00:00:00 2001 From: Yi Wang up2w...@gmail.com Date: Mon, 12 Jan 2015 00:05:40 +0800 Subject: [PATCH] savevm: create snapshot failed when id_str already exits Create snapshot

Re: [Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-02-23 Thread Amit Shah
On (Mon) 12 Jan 2015 [01:12:41], Yi Wang wrote: From b119164ba6715f53594facfc4d1022c198852e9d Mon Sep 17 00:00:00 2001 From: Yi Wang up2w...@gmail.com Date: Mon, 12 Jan 2015 00:05:40 +0800 Subject: [PATCH] savevm: create snapshot failed when id_str already exits Create snapshot failed in

[Qemu-devel] [PATCH] savevm: create snapshot failed when id_str already exits

2015-01-11 Thread Yi Wang
From b119164ba6715f53594facfc4d1022c198852e9d Mon Sep 17 00:00:00 2001 From: Yi Wang up2w...@gmail.com 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