[libvirt] [PATCH v2 2/2] Implement SCSI disk unplugging
Eric Blake
eblake at redhat.com
Thu May 6 21:57:47 UTC 2010
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 at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100506/3ff4716e/attachment-0001.sig>
More information about the libvir-list
mailing list