[libvirt] [PATCH 10/11] qemu: hotplug: Refactor qemuHotplugPrepareDiskAccess to work on virStorageSource

Ján Tomko jtomko at redhat.com
Tue Jan 29 14:15:20 UTC 2019


On Wed, Jan 23, 2019 at 05:11:05PM +0100, Peter Krempa wrote:
>Rather than passing in a virStorageSource which would override the
>originally passed disk->src we can now drop passing in a disk completely
>as all functions called inside here require a virStorageSource.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_hotplug.c | 75 ++++++++++++++++-------------------------
> 1 file changed, 29 insertions(+), 46 deletions(-)
>
>diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
>index b08f443fbc..19aed3ee8e 100644
>--- a/src/qemu/qemu_hotplug.c
>+++ b/src/qemu/qemu_hotplug.c
>@@ -68,37 +68,29 @@ unsigned long long qemuDomainRemoveDeviceWaitTime = 1000ull * 5;
>
>
> /**
>- * qemuHotplugPrepareDiskAccess:
>+ * qemuHotplugPrepareDiskSourceAccess:
>  * @driver: qemu driver struct
>  * @vm: domain object
>- * @disk: disk to prepare
>- * @overridesrc: Source different than @disk->src when necessary
>- * @teardown: Teardown the disk instead of adding it to a vm
>+ * @src: Source to prepare
>+ * @teardown: Teardown the access to @src instead of adding it to a vm
>  *
>- * Setup the locks, cgroups and security permissions on a disk of a VM.
>- * If @overridesrc is specified the source struct is used instead of the
>- * one present in @disk. If @teardown is true, then the labels and cgroups
>- * are removed instead.
>+ * Setup the locks, cgroups and security permissions on a disk source and it's

*its

>+ * backing chain. If @teardown is true, then the labels and cgroups are removed
>+ * instead.
>  *
>  * Returns 0 on success and -1 on error. Reports libvirt error.
>  */
> static int

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190129/5b921f06/attachment-0001.sig>


More information about the libvir-list mailing list