]> Git Repo - qemu.git/commit
savevm: create snapshot failed when id_str already exists
authorYi Wang <[email protected]>
Thu, 12 Mar 2015 14:54:42 +0000 (22:54 +0800)
committerKevin Wolf <[email protected]>
Tue, 28 Apr 2015 13:36:08 +0000 (15:36 +0200)
commit407bc15033b2a8faeb7ca42aab63b7bcede76e10
treed34a1612f3935fbaf0d2c29c0466f0fa45dd61e3
parent84cbd63f87c1d246f51ec8eee5367a5588f367fd
savevm: create snapshot failed when id_str already exists

The command "virsh create" will fail in such condition: vm has two
disks: vda and vdb. 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 exists in vdb with name "s2"!

The simplest way is call find_new_snapshot_id() unconditionally.

Signed-off-by: Yi Wang <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/qcow2-snapshot.c
This page took 0.03587 seconds and 4 git commands to generate.