]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu: hotplug: Properly clean up drive backend if frontend hotplug fails
authorPeter Krempa <pkrempa@redhat.com>
Fri, 11 Sep 2015 15:34:18 +0000 (17:34 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 14 Sep 2015 07:41:43 +0000 (09:41 +0200)
commit64c6695f1ad72f0a99faace5deb1caf7effa2275
treea2515c74677c7ac999ecff35559b4a40572df8bc
parentdb35beaa1d276cc229dcbbc8460ce2fccdda5084
qemu: hotplug: Properly clean up drive backend if frontend hotplug fails

Commit 8125113c added code that should remove the disk backend if the
fronted hotplug failed for any reason. The code had a bug though as it
used the disk string for unplug rather than the backend alias. Fix the
code by pre-creating an alias string and using it instead of the disk
string. In cases where qemu does not support QEMU_CAPS_DEVICE, we ignore
the unplug of the backend since we can't really create an alias in that
case.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1262399
src/qemu/qemu_hotplug.c