]> git.ipfire.org Git - thirdparty/libvirt.git/commit
protect the scsi controller to be deleted when it is in use
authorWen Congyang <wency@cn.fujitsu.com>
Mon, 21 Feb 2011 07:35:52 +0000 (15:35 +0800)
committerEric Blake <eblake@redhat.com>
Mon, 21 Feb 2011 17:38:19 +0000 (10:38 -0700)
commitcf61114ceeec332e3d5d0c519cff2bc202826b27
tree667e3d7f32e3900822534b2b892343d455b59912
parentf409661e71d85ec6e2b0b80fc4e5691b8f436327
protect the scsi controller to be deleted when it is in use

Steps to reproduce this bug:
1. virsh attach-disk domain --source imagefile --target sdb --sourcetype file --driver qemu --subdriver raw
2. virsh detach-device controller.xml # remove scsi controller 0
3. virsh detach-disk domain sdb
   error: Failed to detach disk
   error: operation failed: detaching scsi0-0-1 device failed: Device 'scsi0-0-1' not found

I think we should not detach a controller when it is used by some other device.

Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
src/qemu/qemu_hotplug.c