
On 05/05/2010 08:52 AM, Wolfgang Mauerer wrote:
With the introduction of the generic qemu device model, unplugging SCSI disks works like a charm, so support it in libvirt.
* src/qemu/qemu_driver.c: Add qemudDomainDetachSCSIDiskDevice() to do the unplugging, extend qemudDomainDetachDeviceAdd().
Good, you addressed Daniel's comments.
@@ -7940,6 +7940,51 @@ static int qemudDomainDetachPciDiskDevice(struct qemud_driver *driver,
qemudShrinkDisks(vm->def, i);
+ if (driver->securityDriver && + driver->securityDriver->domainRestoreSecurityImageLabel && + driver->securityDriver->domainRestoreSecurityImageLabel(vm, dev->data.disk) < 0) + VIR_WARN("Unable to restore security label on %s", dev->data.disk->src); + + ret = 0; + +cleanup: + return ret; +}
Sometimes diff algorithms pick the oddest points to start at, don't they :)
+ +static int qemudDomainDetachSCSIDiskDevice(struct qemud_driver *driver, + virDomainObjPtr vm, + virDomainDeviceDefPtr dev, + unsigned long long qemuCmdFlags)
Your spacing here wasn't quite right ('SCSI' is longer than 'Pci', so the '(' is one column further over), so I adjusted that (and this time, I saved my editor and amended the patch before sending this email). You also had some trailing blanks, caught by 'make syntax-check'. ACK, and pushed. -- Eric Blake eblake@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org