[libvirt] [PATCH 08/10] qemu: hotplug: Refactor/simplify PR managed addition to VM
Ján Tomko
jtomko at redhat.com
Thu Jul 19 13:10:56 UTC 2018
On Tue, Jul 17, 2018 at 02:14:28PM +0200, Peter Krempa wrote:
>Similarly to qemuDomainDiskRemoveManagedPR make it enter monitor on
>it's own so that it can be reused. Future users will be in the snapshot
its
>code and in removable media change code.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_hotplug.c | 55 ++++++++++++++++++++++++++-----------------------
> 1 file changed, 29 insertions(+), 26 deletions(-)
>
>@@ -619,11 +628,10 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver,
> if (VIR_REALLOC_N(vm->def->disks, vm->def->ndisks + 1) < 0)
> goto error;
>
>- qemuDomainObjEnterMonitor(driver, vm);
>+ if (qemuHotplugAttachManagedPR(driver, vm, disk->src, QEMU_ASYNC_JOB_NONE) < 0)
>+ goto error;
>
>- if (managedPrmgrProps &&
>- qemuMonitorAddObject(priv->mon, &managedPrmgrProps, &managedPrmgrAlias) < 0)
Both variables are unused after this change.
>- goto exit_monitor;
>+ qemuDomainObjEnterMonitor(driver, vm);
>
> if (qemuHotplugDiskSoureceAttach(priv->mon, diskdata) < 0)
> goto exit_monitor;
Reviewed-by: Ján Tomko <jtomko at redhat.com>
Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180719/872e2d60/attachment-0001.sig>
More information about the libvir-list
mailing list