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@xxxxxxxxxx> > --- > 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)
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list