]> xenbits.xensource.com Git - libvirt.git/commit
qemu: Remove the shared disk entry if the operation is ejecting or updating
authorOsier Yang <jyang@redhat.com>
Tue, 19 Feb 2013 12:27:45 +0000 (20:27 +0800)
committerOsier Yang <jyang@redhat.com>
Wed, 20 Feb 2013 16:31:24 +0000 (00:31 +0800)
commitd0172d2b1b5d865aaa042070d7c2d00effb2ff8c
tree8b7abf9ac8d22e8117b2e933b11b74d16810e563
parent0db7ff59cc419d9859925e1324f021f59e2fe260
qemu: Remove the shared disk entry if the operation is ejecting or updating

For both AttachDevice and UpdateDevice APIs, if the disk device
is 'cdrom' or 'floppy', the operations could be ejecting, updating,
and inserting. For either ejecting or updating, the shared disk
entry of the original disk src has to be removed, because it's
not useful anymore.

And since the original disk def will be changed, new disk def passed
as argument will be free'ed in qemuDomainChangeEjectableMedia, so
we need to copy the orignal disk def before
qemuDomainChangeEjectableMedia, to use it for qemuRemoveSharedDisk.
src/conf/domain_conf.c
src/conf/domain_conf.h
src/libvirt_private.syms
src/qemu/qemu_driver.c
src/qemu/qemu_hotplug.c
src/qemu/qemu_hotplug.h