[libvirt] [PATCH 04/10] qemu: hotplug: Prepare for multiple backing chain member hotplug
Peter Krempa
pkrempa at redhat.com
Tue Jul 17 13:11:42 UTC 2018
On Tue, Jul 17, 2018 at 14:14:24 +0200, Peter Krempa wrote:
> Similarly to how we've intergrated data belonging to a single
> virStorageSource for purposes of attaching it to a qemu instance we will
> need to agregate data relevant for the whole disk. With blockdev there
> will be some disk-wide backing chain members such as the copy-on-read
> handler.
>
> Introduce qemuHotplugDiskSourceData which agregates the backing chain
> and other data relevant for the disk and functions which generate it
> and apply and rollback it.
>
> In addition to disk hotplug this will also be reused for media changing
> where we need to exchange the full disk backend.
>
> Signed-off-by: Peter Krempa <pkrempa at redhat.com>
> ---
> src/qemu/qemu_hotplug.c | 118 ++++++++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 109 insertions(+), 9 deletions(-)
[...]
> + * qemuHotplugDiskSourceAttach:
> + * @mon: monitor object
> + * @data: disk backend data object describing what to remove
> + *
> + * Attach a disk source backend with all relevant pieces. Caller must enter the
> + * monitor context for @mon.
> + */
> +static int
> +qemuHotplugDiskSoureceAttach(qemuMonitorPtr mon,
> + qemuHotplugDiskSourceDataPtr data)
> +{
I forgot to squash in a patch that fixes the typo in the name. I've done
the following modification to my private branch:
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 5f3ff0f7ba..4251c79bf0 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -532,8 +532,8 @@ qemuHotplugDiskSourceAttachPrepare(virDomainDiskDefPtr disk,
* monitor context for @mon.
*/
static int
-qemuHotplugDiskSoureceAttach(qemuMonitorPtr mon,
- qemuHotplugDiskSourceDataPtr data)
+qemuHotplugDiskSourceAttach(qemuMonitorPtr mon,
+ qemuHotplugDiskSourceDataPtr data)
{
size_t i;
@@ -658,7 +658,7 @@ qemuDomainAttachDiskGeneric(virQEMUDriverPtr driver,
qemuDomainObjEnterMonitor(driver, vm);
- if (qemuHotplugDiskSoureceAttach(priv->mon, diskdata) < 0)
+ if (qemuHotplugDiskSourceAttach(priv->mon, diskdata) < 0)
goto exit_monitor;
if (qemuMonitorAddDevice(priv->mon, devstr) < 0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180717/59303bec/attachment-0001.sig>
More information about the libvir-list
mailing list