[libvirt] [PATCH v2 0/5] Cleanup storage migration code a bit

Version 2: - move QEMU-only data from virDomainDiskDef to a private data object Jiri Denemark (5): Add privateData to virDomainDiskDef Rename virDomainHasBlockjob as qemuDomainHasBlockjob Move QEMU-only fields from virDomainDiskDef into privateData qemu: Keep track of what disks are being migrated qemu: Don't give up on first error in qemuMigrationCancelDriverMirror src/conf/domain_conf.c | 43 ++++------------------- src/conf/domain_conf.h | 19 +++------- src/libvirt_private.syms | 1 - src/parallels/parallels_sdk.c | 4 +-- src/qemu/qemu_blockjob.c | 48 ++++++++++++++----------- src/qemu/qemu_command.c | 4 +-- src/qemu/qemu_domain.c | 81 ++++++++++++++++++++++++++++++++++++++++++- src/qemu/qemu_domain.h | 25 +++++++++++++ src/qemu/qemu_driver.c | 15 ++++---- src/qemu/qemu_migration.c | 42 +++++++++++----------- src/qemu/qemu_process.c | 17 +++++---- src/vbox/vbox_common.c | 4 +-- src/vbox/vbox_tmpl.c | 6 ++-- src/vmx/vmx.c | 2 +- src/xenconfig/xen_sxpr.c | 6 ++-- src/xenconfig/xen_xl.c | 2 +- src/xenconfig/xen_xm.c | 4 +-- 17 files changed, 201 insertions(+), 122 deletions(-) -- 2.4.0

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 2: - new patch src/conf/domain_conf.c | 14 +++++++++----- src/conf/domain_conf.h | 6 +++++- src/parallels/parallels_sdk.c | 4 ++-- src/qemu/qemu_command.c | 4 ++-- src/vbox/vbox_common.c | 4 ++-- src/vbox/vbox_tmpl.c | 6 +++--- src/vmx/vmx.c | 2 +- src/xenconfig/xen_sxpr.c | 6 +++--- src/xenconfig/xen_xl.c | 2 +- src/xenconfig/xen_xm.c | 4 ++-- 10 files changed, 30 insertions(+), 22 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index add857c..d3a9093 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1275,7 +1275,7 @@ void virDomainLeaseDefFree(virDomainLeaseDefPtr def) virDomainDiskDefPtr -virDomainDiskDefNew(void) +virDomainDiskDefNew(virDomainXMLOptionPtr xmlopt) { virDomainDiskDefPtr ret; @@ -1285,6 +1285,11 @@ virDomainDiskDefNew(void) if (VIR_ALLOC(ret->src) < 0) goto error; + if (xmlopt && + xmlopt->privateData.diskNew && + !(ret->privateData = xmlopt->privateData.diskNew())) + goto error; + if (virCondInit(&ret->blockJobSyncCond) < 0) { virReportSystemError(errno, "%s", _("Failed to initialize condition")); goto error; @@ -1293,9 +1298,7 @@ virDomainDiskDefNew(void) return ret; error: - virStorageSourceFree(ret->src); - VIR_FREE(ret); - + virDomainDiskDefFree(ret); return NULL; } @@ -1315,6 +1318,7 @@ virDomainDiskDefFree(virDomainDiskDefPtr def) VIR_FREE(def->product); VIR_FREE(def->domain_name); virDomainDeviceInfoClear(&def->info); + virObjectUnref(def->privateData); virCondDestroy(&def->blockJobSyncCond); VIR_FREE(def); @@ -6121,7 +6125,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt, int auth_secret_usage = -1; int ret = 0; - if (!(def = virDomainDiskDefNew())) + if (!(def = virDomainDiskDefNew(xmlopt))) return NULL; def->geometry.cylinders = 0; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 2cd105a7..f57f3c9 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -683,6 +683,8 @@ typedef enum { struct _virDomainDiskDef { virStorageSourcePtr src; /* non-NULL. XXX Allow NULL for empty cdrom? */ + virObjectPtr privateData; + int device; /* enum virDomainDiskDevice */ int bus; /* enum virDomainDiskBus */ char *dst; @@ -2332,6 +2334,7 @@ typedef virDomainXMLOption *virDomainXMLOptionPtr; typedef void *(*virDomainXMLPrivateDataAllocFunc)(void); typedef void (*virDomainXMLPrivateDataFreeFunc)(void *); +typedef virObjectPtr (*virDomainXMLPrivateDataNewFunc)(void); typedef int (*virDomainXMLPrivateDataFormatFunc)(virBufferPtr, void *); typedef int (*virDomainXMLPrivateDataParseFunc)(xmlXPathContextPtr, void *); @@ -2368,6 +2371,7 @@ typedef virDomainXMLPrivateDataCallbacks *virDomainXMLPrivateDataCallbacksPtr; struct _virDomainXMLPrivateDataCallbacks { virDomainXMLPrivateDataAllocFunc alloc; virDomainXMLPrivateDataFreeFunc free; + virDomainXMLPrivateDataNewFunc diskNew; virDomainXMLPrivateDataFormatFunc format; virDomainXMLPrivateDataParseFunc parse; }; @@ -2420,7 +2424,7 @@ void virDomainPanicDefFree(virDomainPanicDefPtr panic); void virDomainResourceDefFree(virDomainResourceDefPtr resource); void virDomainGraphicsDefFree(virDomainGraphicsDefPtr def); void virDomainInputDefFree(virDomainInputDefPtr def); -virDomainDiskDefPtr virDomainDiskDefNew(void); +virDomainDiskDefPtr virDomainDiskDefNew(virDomainXMLOptionPtr xmlopt); void virDomainDiskDefFree(virDomainDiskDefPtr def); void virDomainLeaseDefFree(virDomainLeaseDefPtr def); int virDomainDiskGetType(virDomainDiskDefPtr def); diff --git a/src/parallels/parallels_sdk.c b/src/parallels/parallels_sdk.c index ad744c9..08d4a48 100644 --- a/src/parallels/parallels_sdk.c +++ b/src/parallels/parallels_sdk.c @@ -626,7 +626,7 @@ prlsdkAddDomainHardDisksInfo(PRL_HANDLE sdkdom, virDomainDefPtr def) PrlHandle_Free(hdd); hdd = PRL_INVALID_HANDLE; } else { - if (!(disk = virDomainDiskDefNew())) + if (!(disk = virDomainDiskDefNew(NULL))) goto error; if (prlsdkGetDiskInfo(hdd, disk, false) < 0) @@ -666,7 +666,7 @@ prlsdkAddDomainOpticalDisksInfo(PRL_HANDLE sdkdom, virDomainDefPtr def) pret = PrlVmCfg_GetOpticalDisk(sdkdom, i, &cdrom); prlsdkCheckRetGoto(pret, error); - if (!(disk = virDomainDiskDefNew())) + if (!(disk = virDomainDiskDefNew(NULL))) goto error; if (prlsdkGetDiskInfo(cdrom, disk, true) < 0) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 5d0a167..2939f8d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -12566,7 +12566,7 @@ qemuParseCommandLine(virCapsPtr qemuCaps, STRPREFIX(arg, "-fd") || STREQ(arg, "-cdrom")) { WANT_VALUE(); - if (!(disk = virDomainDiskDefNew())) + if (!(disk = virDomainDiskDefNew(xmlopt))) goto error; if (STRPREFIX(val, "/dev/")) { @@ -12868,7 +12868,7 @@ qemuParseCommandLine(virCapsPtr qemuCaps, goto error; } } else if (STRPREFIX(val, "disk:")) { - if (!(disk = virDomainDiskDefNew())) + if (!(disk = virDomainDiskDefNew(xmlopt))) goto error; if (VIR_STRDUP(disk->src->path, val + strlen("disk:")) < 0) goto error; diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index e3a1739..ba0b039 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -3126,7 +3126,7 @@ vboxDumpIDEHDDsNew(virDomainDefPtr def, vboxGlobalData *data, IMachine *machine) /* Allocate mem, if fails return error */ if (VIR_ALLOC_N(def->disks, def->ndisks) >= 0) { for (i = 0; i < def->ndisks; i++) { - virDomainDiskDefPtr disk = virDomainDiskDefNew(); + virDomainDiskDefPtr disk = virDomainDiskDefNew(NULL); if (!disk) { error = true; break; @@ -5850,7 +5850,7 @@ int vboxSnapshotGetReadOnlyDisks(virDomainSnapshotPtr snapshot, /* Allocate mem, if fails return error */ if (VIR_ALLOC_N(def->dom->disks, def->dom->ndisks) >= 0) { for (i = 0; i < def->dom->ndisks; i++) { - virDomainDiskDefPtr diskDef = virDomainDiskDefNew(); + virDomainDiskDefPtr diskDef = virDomainDiskDefNew(NULL); if (!diskDef) goto cleanup; def->dom->disks[i] = diskDef; diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 22eecd4..409ecef 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -2187,7 +2187,7 @@ _dumpIDEHDDsOld(virDomainDefPtr def, if ((def->ndisks > 0) && (VIR_ALLOC_N(def->disks, def->ndisks) >= 0)) { size_t i; for (i = 0; i < def->ndisks; i++) { - if ((def->disks[i] = virDomainDiskDefNew())) { + if ((def->disks[i] = virDomainDiskDefNew(NULL))) { def->disks[i]->device = VIR_DOMAIN_DISK_DEVICE_DISK; def->disks[i]->bus = VIR_DOMAIN_DISK_BUS_IDE; virDomainDiskSetType(def->disks[i], @@ -2295,7 +2295,7 @@ _dumpDVD(virDomainDefPtr def, def->ndisks++; if (VIR_REALLOC_N(def->disks, def->ndisks) >= 0) { - if ((def->disks[def->ndisks - 1] = virDomainDiskDefNew())) { + if ((def->disks[def->ndisks - 1] = virDomainDiskDefNew(NULL))) { def->disks[def->ndisks - 1]->device = VIR_DOMAIN_DISK_DEVICE_CDROM; def->disks[def->ndisks - 1]->bus = VIR_DOMAIN_DISK_BUS_IDE; virDomainDiskSetType(def->disks[def->ndisks - 1], @@ -2437,7 +2437,7 @@ _dumpFloppy(virDomainDefPtr def, def->ndisks++; if (VIR_REALLOC_N(def->disks, def->ndisks) >= 0) { - if ((def->disks[def->ndisks - 1] = virDomainDiskDefNew())) { + if ((def->disks[def->ndisks - 1] = virDomainDiskDefNew(NULL))) { def->disks[def->ndisks - 1]->device = VIR_DOMAIN_DISK_DEVICE_FLOPPY; def->disks[def->ndisks - 1]->bus = VIR_DOMAIN_DISK_BUS_FDC; virDomainDiskSetType(def->disks[def->ndisks - 1], diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index cacc951..aede2ad 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -1980,7 +1980,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con return -1; } - if (!(*def = virDomainDiskDefNew())) + if (!(*def = virDomainDiskDefNew(xmlopt))) return -1; (*def)->device = device; diff --git a/src/xenconfig/xen_sxpr.c b/src/xenconfig/xen_sxpr.c index 5f58fd8..8985295 100644 --- a/src/xenconfig/xen_sxpr.c +++ b/src/xenconfig/xen_sxpr.c @@ -372,7 +372,7 @@ xenParseSxprDisks(virDomainDefPtr def, bootable = sexpr_node(node, "device/tap/bootable"); } - if (!(disk = virDomainDiskDefNew())) + if (!(disk = virDomainDiskDefNew(NULL))) goto error; if (dst == NULL) { @@ -1316,7 +1316,7 @@ xenParseSxpr(const struct sexpr *root, tmp = sexpr_node(root, "domain/image/hvm/cdrom"); if ((tmp != NULL) && (tmp[0] != 0)) { virDomainDiskDefPtr disk; - if (!(disk = virDomainDiskDefNew())) + if (!(disk = virDomainDiskDefNew(NULL))) goto error; if (virDomainDiskSetSource(disk, tmp) < 0) { virDomainDiskDefFree(disk); @@ -1351,7 +1351,7 @@ xenParseSxpr(const struct sexpr *root, tmp = sexpr_fmt_node(root, "domain/image/hvm/%s", fds[i]); if ((tmp != NULL) && (tmp[0] != 0)) { virDomainDiskDefPtr disk; - if (!(disk = virDomainDiskDefNew())) + if (!(disk = virDomainDiskDefNew(NULL))) goto error; if (virDomainDiskSetSource(disk, tmp) < 0) { virDomainDiskDefFree(disk); diff --git a/src/xenconfig/xen_xl.c b/src/xenconfig/xen_xl.c index db554b2..b12d306 100644 --- a/src/xenconfig/xen_xl.c +++ b/src/xenconfig/xen_xl.c @@ -286,7 +286,7 @@ xenParseXLDisk(virConfPtr conf, virDomainDefPtr def) if (xlu_disk_parse(xluconf, 1, &disk_spec, libxldisk)) goto fail; - if (!(disk = virDomainDiskDefNew())) + if (!(disk = virDomainDiskDefNew(NULL))) goto fail; if (VIR_STRDUP(disk->dst, libxldisk->vdev) < 0) diff --git a/src/xenconfig/xen_xm.c b/src/xenconfig/xen_xm.c index fafe662..a4d1203 100644 --- a/src/xenconfig/xen_xm.c +++ b/src/xenconfig/xen_xm.c @@ -123,7 +123,7 @@ xenParseXMDisk(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) goto skipdisk; head = list->str; - if (!(disk = virDomainDiskDefNew())) + if (!(disk = virDomainDiskDefNew(NULL))) return -1; /* @@ -275,7 +275,7 @@ xenParseXMDisk(virConfPtr conf, virDomainDefPtr def, int xendConfigVersion) if (xenConfigGetString(conf, "cdrom", &str, NULL) < 0) goto cleanup; if (str) { - if (!(disk = virDomainDiskDefNew())) + if (!(disk = virDomainDiskDefNew(NULL))) goto cleanup; virDomainDiskSetType(disk, VIR_STORAGE_TYPE_FILE); -- 2.4.0

And move it to qemu_domain.[ch] because this API is QEMU-only. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 2: - new patch src/conf/domain_conf.c | 27 --------------------------- src/conf/domain_conf.h | 3 --- src/qemu/qemu_domain.c | 28 ++++++++++++++++++++++++++++ src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_migration.c | 2 +- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index d3a9093..3204140 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -12322,33 +12322,6 @@ virDomainDiskRemoveByName(virDomainDefPtr def, const char *name) return virDomainDiskRemove(def, idx); } -/** - * virDomainHasBlockjob: - * @vm: domain object - * @copy_only: Reject only block copy job - * - * Return true if @vm has at least one disk involved in a current block - * copy/commit/pull job. If @copy_only is true this returns true only if the - * disk is involved in a block copy. - * */ -bool -virDomainHasBlockjob(virDomainObjPtr vm, - bool copy_only) -{ - size_t i; - for (i = 0; i < vm->def->ndisks; i++) { - if (!copy_only && - vm->def->disks[i]->blockjob) - return true; - - if (vm->def->disks[i]->mirror && - vm->def->disks[i]->mirrorJob == VIR_DOMAIN_BLOCK_JOB_TYPE_COPY) - return true; - } - - return false; -} - int virDomainNetInsert(virDomainDefPtr def, virDomainNetDefPtr net) { /* hostdev net devices must also exist in the hostdevs array */ diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index f57f3c9..b5e7617 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2697,9 +2697,6 @@ int virDomainDiskSourceParse(xmlNodePtr node, xmlXPathContextPtr ctxt, virStorageSourcePtr src); -bool virDomainHasBlockjob(virDomainObjPtr vm, - bool copy_only); - int virDomainNetFindIdx(virDomainDefPtr def, virDomainNetDefPtr net); virDomainNetDefPtr virDomainNetFind(virDomainDefPtr def, const char *device); bool virDomainHasNet(virDomainDefPtr def, virDomainNetDefPtr net); diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index fa8229f..b69f10f 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -2828,6 +2828,34 @@ qemuDomainDiskBlockJobIsActive(virDomainDiskDefPtr disk) } +/** + * qemuDomainHasBlockjob: + * @vm: domain object + * @copy_only: Reject only block copy job + * + * Return true if @vm has at least one disk involved in a current block + * copy/commit/pull job. If @copy_only is true this returns true only if the + * disk is involved in a block copy. + * */ +bool +qemuDomainHasBlockjob(virDomainObjPtr vm, + bool copy_only) +{ + size_t i; + for (i = 0; i < vm->def->ndisks; i++) { + if (!copy_only && + vm->def->disks[i]->blockjob) + return true; + + if (vm->def->disks[i]->mirror && + vm->def->disks[i]->mirrorJob == VIR_DOMAIN_BLOCK_JOB_TYPE_COPY) + return true; + } + + return false; +} + + int qemuDomainUpdateDeviceList(virQEMUDriverPtr driver, virDomainObjPtr vm, diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 3162f84..7f2e4b5 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -432,6 +432,8 @@ int qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo, int qemuDomainSupportsBlockJobs(virDomainObjPtr vm, bool *modern) ATTRIBUTE_NONNULL(1); bool qemuDomainDiskBlockJobIsActive(virDomainDiskDefPtr disk); +bool qemuDomainHasBlockjob(virDomainObjPtr vm, bool copy_only) + ATTRIBUTE_NONNULL(1); int qemuDomainAlignMemorySizes(virDomainDefPtr def); void qemuDomainMemoryDeviceAlignSize(virDomainMemoryDefPtr mem); diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f7433ee..c54199c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -7734,7 +7734,7 @@ static virDomainPtr qemuDomainDefineXMLFlags(virConnectPtr conn, const char *xml virObjectRef(vm); def = NULL; - if (virDomainHasBlockjob(vm, true)) { + if (qemuDomainHasBlockjob(vm, true)) { virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, "%s", _("domain has active block job")); virDomainObjAssignDef(vm, NULL, false, NULL); @@ -15622,7 +15622,7 @@ qemuDomainRevertToSnapshot(virDomainSnapshotPtr snapshot, if (!(caps = virQEMUDriverGetCapabilities(driver, false))) goto cleanup; - if (virDomainHasBlockjob(vm, false)) { + if (qemuDomainHasBlockjob(vm, false)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("domain has active block job")); goto cleanup; diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index c1af704..8f2189b 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2067,7 +2067,7 @@ qemuMigrationIsAllowed(virQEMUDriverPtr driver, virDomainObjPtr vm, } - if (virDomainHasBlockjob(vm, false)) { + if (qemuDomainHasBlockjob(vm, false)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("domain has an active block job")); return false; -- 2.4.0

On 13.05.2015 14:28, Jiri Denemark wrote:
And move it to qemu_domain.[ch] because this API is QEMU-only.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 2: - new patch
src/conf/domain_conf.c | 27 --------------------------- src/conf/domain_conf.h | 3 --- src/qemu/qemu_domain.c | 28 ++++++++++++++++++++++++++++ src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_migration.c | 2 +- 6 files changed, 33 insertions(+), 33 deletions(-)
You forgot one place: src/libvirt_private.syms:311:virDomainHasBlockjob; ACK with that fixed. Michal

On Thu, May 14, 2015 at 17:55:22 +0200, Michal Privoznik wrote:
On 13.05.2015 14:28, Jiri Denemark wrote:
And move it to qemu_domain.[ch] because this API is QEMU-only.
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> ---
Notes: Version 2: - new patch
src/conf/domain_conf.c | 27 --------------------------- src/conf/domain_conf.h | 3 --- src/qemu/qemu_domain.c | 28 ++++++++++++++++++++++++++++ src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_driver.c | 4 ++-- src/qemu/qemu_migration.c | 2 +- 6 files changed, 33 insertions(+), 33 deletions(-)
You forgot one place:
src/libvirt_private.syms:311:virDomainHasBlockjob;
Oops, I squashed this change into 3/5. Thanks for noticing it. Jirka

Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 2: - new patch src/conf/domain_conf.c | 6 ----- src/conf/domain_conf.h | 10 -------- src/libvirt_private.syms | 1 - src/qemu/qemu_blockjob.c | 48 +++++++++++++++++++++---------------- src/qemu/qemu_domain.c | 61 +++++++++++++++++++++++++++++++++++++++++++---- src/qemu/qemu_domain.h | 21 ++++++++++++++++ src/qemu/qemu_driver.c | 11 +++++---- src/qemu/qemu_migration.c | 6 +++-- src/qemu/qemu_process.c | 17 +++++++------ 9 files changed, 125 insertions(+), 56 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 3204140..bf0099d 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -1290,11 +1290,6 @@ virDomainDiskDefNew(virDomainXMLOptionPtr xmlopt) !(ret->privateData = xmlopt->privateData.diskNew())) goto error; - if (virCondInit(&ret->blockJobSyncCond) < 0) { - virReportSystemError(errno, "%s", _("Failed to initialize condition")); - goto error; - } - return ret; error: @@ -1319,7 +1314,6 @@ virDomainDiskDefFree(virDomainDiskDefPtr def) VIR_FREE(def->domain_name); virDomainDeviceInfoClear(&def->info); virObjectUnref(def->privateData); - virCondDestroy(&def->blockJobSyncCond); VIR_FREE(def); } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index b5e7617..8312c20 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -691,20 +691,10 @@ struct _virDomainDiskDef { int tray_status; /* enum virDomainDiskTray */ int removable; /* enum virTristateSwitch */ - /* ideally we want a smarter way to interlock block jobs on single qemu disk - * in the future, but for now we just disallow any concurrent job on a - * single disk */ - bool blockjob; virStorageSourcePtr mirror; int mirrorState; /* enum virDomainDiskMirrorState */ int mirrorJob; /* virDomainBlockJobType */ - /* for some synchronous block jobs, we need to notify the owner */ - virCond blockJobSyncCond; - int blockJobType; /* type of the block job from the event */ - int blockJobStatus; /* status of the finished block job */ - bool blockJobSync; /* the block job needs synchronized termination */ - struct { unsigned int cylinders; unsigned int heads; diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 67a7e21..2586572 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -308,7 +308,6 @@ virDomainGraphicsTypeFromString; virDomainGraphicsTypeToString; virDomainGraphicsVNCSharePolicyTypeFromString; virDomainGraphicsVNCSharePolicyTypeToString; -virDomainHasBlockjob; virDomainHasNet; virDomainHostdevCapsTypeToString; virDomainHostdevDefAlloc; diff --git a/src/qemu/qemu_blockjob.c b/src/qemu/qemu_blockjob.c index 729928a..b9572d0 100644 --- a/src/qemu/qemu_blockjob.c +++ b/src/qemu/qemu_blockjob.c @@ -65,6 +65,7 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver, virQEMUDriverConfigPtr cfg = virQEMUDriverGetConfig(driver); virDomainDiskDefPtr persistDisk = NULL; bool save = false; + qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); /* Have to generate two variants of the event for old vs. new * client callbacks */ @@ -127,7 +128,7 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver, disk->mirrorJob = VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN; ignore_value(qemuDomainDetermineDiskChain(driver, vm, disk, true, true)); - disk->blockjob = false; + diskPriv->blockjob = false; break; case VIR_DOMAIN_BLOCK_JOB_READY: @@ -143,7 +144,7 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver, VIR_DOMAIN_DISK_MIRROR_STATE_ABORT : VIR_DOMAIN_DISK_MIRROR_STATE_NONE; disk->mirrorJob = VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN; save = true; - disk->blockjob = false; + diskPriv->blockjob = false; break; case VIR_DOMAIN_BLOCK_JOB_LAST: @@ -185,11 +186,13 @@ qemuBlockJobEventProcess(virQEMUDriverPtr driver, void qemuBlockJobSyncBegin(virDomainDiskDefPtr disk) { - if (disk->blockJobSync) + qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); + + if (diskPriv->blockJobSync) VIR_WARN("Disk %s already has synchronous block job", disk->dst); - disk->blockJobSync = true; + diskPriv->blockJobSync = true; } @@ -211,15 +214,17 @@ qemuBlockJobSyncEnd(virQEMUDriverPtr driver, virDomainDiskDefPtr disk, virConnectDomainEventBlockJobStatus *ret_status) { - if (disk->blockJobSync && disk->blockJobStatus != -1) { + qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); + + if (diskPriv->blockJobSync && diskPriv->blockJobStatus != -1) { if (ret_status) - *ret_status = disk->blockJobStatus; + *ret_status = diskPriv->blockJobStatus; qemuBlockJobEventProcess(driver, vm, disk, - disk->blockJobType, - disk->blockJobStatus); - disk->blockJobStatus = -1; + diskPriv->blockJobType, + diskPriv->blockJobStatus); + diskPriv->blockJobStatus = -1; } - disk->blockJobSync = false; + diskPriv->blockJobSync = false; } @@ -248,24 +253,26 @@ qemuBlockJobSyncWaitWithTimeout(virQEMUDriverPtr driver, unsigned long long timeout, virConnectDomainEventBlockJobStatus *ret_status) { - if (!disk->blockJobSync) { + qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); + + if (!diskPriv->blockJobSync) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("No current synchronous block job")); return -1; } - while (disk->blockJobSync && disk->blockJobStatus == -1) { + while (diskPriv->blockJobSync && diskPriv->blockJobStatus == -1) { int r; if (!virDomainObjIsActive(vm)) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("guest unexpectedly quit")); - disk->blockJobSync = false; + diskPriv->blockJobSync = false; return -1; } if (timeout == (unsigned long long)-1) { - r = virCondWait(&disk->blockJobSyncCond, &vm->parent.lock); + r = virCondWait(&diskPriv->blockJobSyncCond, &vm->parent.lock); } else if (timeout) { unsigned long long now; if (virTimeMillisNow(&now) < 0) { @@ -273,7 +280,8 @@ qemuBlockJobSyncWaitWithTimeout(virQEMUDriverPtr driver, _("Unable to get current time")); return -1; } - r = virCondWaitUntil(&disk->blockJobSyncCond, &vm->parent.lock, + r = virCondWaitUntil(&diskPriv->blockJobSyncCond, + &vm->parent.lock, now + timeout); if (r < 0 && errno == ETIMEDOUT) return 0; @@ -283,7 +291,7 @@ qemuBlockJobSyncWaitWithTimeout(virQEMUDriverPtr driver, } if (r < 0) { - disk->blockJobSync = false; + diskPriv->blockJobSync = false; virReportSystemError(errno, "%s", _("Unable to wait on block job sync " "condition")); @@ -292,11 +300,11 @@ qemuBlockJobSyncWaitWithTimeout(virQEMUDriverPtr driver, } if (ret_status) - *ret_status = disk->blockJobStatus; + *ret_status = diskPriv->blockJobStatus; qemuBlockJobEventProcess(driver, vm, disk, - disk->blockJobType, - disk->blockJobStatus); - disk->blockJobStatus = -1; + diskPriv->blockJobType, + diskPriv->blockJobStatus); + diskPriv->blockJobStatus = -1; return 0; } diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b69f10f..608eed7 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -412,6 +412,53 @@ qemuDomainJobInfoToParams(qemuDomainJobInfoPtr jobInfo, } +static virClassPtr qemuDomainDiskPrivateClass; +static void qemuDomainDiskPrivateDispose(void *obj); + +static int +qemuDomainDiskPrivateOnceInit(void) +{ + qemuDomainDiskPrivateClass = virClassNew(virClassForObject(), + "qemuDomainDiskPrivate", + sizeof(qemuDomainDiskPrivate), + qemuDomainDiskPrivateDispose); + if (!qemuDomainDiskPrivateClass) + return -1; + else + return 0; +} + +VIR_ONCE_GLOBAL_INIT(qemuDomainDiskPrivate) + +static virObjectPtr +qemuDomainDiskPrivateNew(void) +{ + qemuDomainDiskPrivatePtr priv; + + if (qemuDomainDiskPrivateInitialize() < 0) + return NULL; + + if (!(priv = virObjectNew(qemuDomainDiskPrivateClass))) + return NULL; + + if (virCondInit(&priv->blockJobSyncCond) < 0) { + virReportSystemError(errno, "%s", _("Failed to initialize condition")); + virObjectUnref(priv); + return NULL; + } + + return (virObjectPtr) priv; +} + +static void +qemuDomainDiskPrivateDispose(void *obj) +{ + qemuDomainDiskPrivatePtr priv = obj; + + virCondDestroy(&priv->blockJobSyncCond); +} + + static void * qemuDomainObjPrivateAlloc(void) { @@ -741,6 +788,7 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt, void *data) virDomainXMLPrivateDataCallbacks virQEMUDriverPrivateDataCallbacks = { .alloc = qemuDomainObjPrivateAlloc, .free = qemuDomainObjPrivateFree, + .diskNew = qemuDomainDiskPrivateNew, .parse = qemuDomainObjPrivateXMLParse, .format = qemuDomainObjPrivateXMLFormat, }; @@ -2809,6 +2857,8 @@ qemuDomainDetermineDiskChain(virQEMUDriverPtr driver, bool qemuDomainDiskBlockJobIsActive(virDomainDiskDefPtr disk) { + qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); + if (disk->mirror) { virReportError(VIR_ERR_BLOCK_COPY_ACTIVE, _("disk '%s' already in active block job"), @@ -2817,7 +2867,7 @@ qemuDomainDiskBlockJobIsActive(virDomainDiskDefPtr disk) return true; } - if (disk->blockjob) { + if (diskPriv->blockjob) { virReportError(VIR_ERR_OPERATION_UNSUPPORTED, _("disk '%s' already in active block job"), disk->dst); @@ -2843,12 +2893,13 @@ qemuDomainHasBlockjob(virDomainObjPtr vm, { size_t i; for (i = 0; i < vm->def->ndisks; i++) { - if (!copy_only && - vm->def->disks[i]->blockjob) + virDomainDiskDefPtr disk = vm->def->disks[i]; + qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); + + if (!copy_only && diskPriv->blockjob) return true; - if (vm->def->disks[i]->mirror && - vm->def->disks[i]->mirrorJob == VIR_DOMAIN_BLOCK_JOB_TYPE_COPY) + if (disk->mirror && disk->mirrorJob == VIR_DOMAIN_BLOCK_JOB_TYPE_COPY) return true; } diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 7f2e4b5..53df1d3 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -34,6 +34,7 @@ # include "qemu_conf.h" # include "qemu_capabilities.h" # include "virchrdev.h" +# include "virobject.h" # define QEMU_DOMAIN_FORMAT_LIVE_FLAGS \ (VIR_DOMAIN_XML_SECURE | \ @@ -199,6 +200,26 @@ struct _qemuDomainObjPrivate { virBitmapPtr autoCpuset; }; +# define QEMU_DOMAIN_DISK_PRIVATE(disk) \ + ((qemuDomainDiskPrivatePtr) (disk)->privateData) + +typedef struct _qemuDomainDiskPrivate qemuDomainDiskPrivate; +typedef qemuDomainDiskPrivate *qemuDomainDiskPrivatePtr; +struct _qemuDomainDiskPrivate { + virObject parent; + + /* ideally we want a smarter way to interlock block jobs on single qemu disk + * in the future, but for now we just disallow any concurrent job on a + * single disk */ + bool blockjob; + + /* for some synchronous block jobs, we need to notify the owner */ + virCond blockJobSyncCond; + int blockJobType; /* type of the block job from the event */ + int blockJobStatus; /* status of the finished block job */ + bool blockJobSync; /* the block job needs synchronized termination */ +}; + typedef enum { QEMU_PROCESS_EVENT_WATCHDOG = 0, QEMU_PROCESS_EVENT_GUESTPANIC, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index c54199c..9344533 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -14315,9 +14315,10 @@ qemuDomainSnapshotPrepare(virConnectPtr conn, for (i = 0; i < def->ndisks; i++) { virDomainSnapshotDiskDefPtr disk = &def->disks[i]; virDomainDiskDefPtr dom_disk = vm->def->disks[i]; + qemuDomainDiskPrivatePtr dom_diskPriv = QEMU_DOMAIN_DISK_PRIVATE(dom_disk); if (disk->snapshot != VIR_DOMAIN_SNAPSHOT_LOCATION_NONE && - dom_disk->blockjob) { + dom_diskPriv->blockjob) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("disk '%s' has an active block job"), disk->name); @@ -16637,7 +16638,7 @@ qemuDomainBlockPullCommon(virQEMUDriverPtr driver, if (ret < 0) goto endjob; - disk->blockjob = true; + QEMU_DOMAIN_DISK_PRIVATE(disk)->blockjob = true; endjob: qemuDomainObjEndJob(driver, vm); @@ -16765,7 +16766,7 @@ qemuDomainBlockJobAbort(virDomainPtr dom, } endjob: - if (disk && disk->blockJobSync) + if (disk && QEMU_DOMAIN_DISK_PRIVATE(disk)->blockJobSync) qemuBlockJobSyncEnd(driver, vm, disk, NULL); qemuDomainObjEndJob(driver, vm); @@ -17098,7 +17099,7 @@ qemuDomainBlockCopyCommon(virDomainObjPtr vm, disk->mirror = mirror; mirror = NULL; disk->mirrorJob = VIR_DOMAIN_BLOCK_JOB_TYPE_COPY; - disk->blockjob = true; + QEMU_DOMAIN_DISK_PRIVATE(disk)->blockjob = true; if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0) VIR_WARN("Unable to save status on vm %s after state change", @@ -17491,7 +17492,7 @@ qemuDomainBlockCommit(virDomainPtr dom, } if (ret == 0) - disk->blockjob = true; + QEMU_DOMAIN_DISK_PRIVATE(disk)->blockjob = true; if (mirror) { if (ret == 0) { diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 8f2189b..7472b09 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1743,6 +1743,7 @@ qemuMigrationCheckDriveMirror(virQEMUDriverPtr driver, for (i = 0; i < vm->def->ndisks; i++) { virDomainDiskDefPtr disk = vm->def->disks[i]; + qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); /* skip shared, RO and source-less disks */ if (disk->src->shared || disk->src->readonly || @@ -1750,7 +1751,7 @@ qemuMigrationCheckDriveMirror(virQEMUDriverPtr driver, continue; /* skip disks that didn't start mirroring */ - if (!disk->blockJobSync) + if (!diskPriv->blockJobSync) continue; /* process any pending event */ @@ -1871,6 +1872,7 @@ qemuMigrationCancelDriveMirror(virQEMUDriverPtr driver, for (i = 0; i < vm->def->ndisks; i++) { virDomainDiskDefPtr disk = vm->def->disks[i]; + qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); /* skip shared, RO and source-less disks */ if (disk->src->shared || disk->src->readonly || @@ -1878,7 +1880,7 @@ qemuMigrationCancelDriveMirror(virQEMUDriverPtr driver, continue; /* skip disks that didn't start mirroring */ - if (!disk->blockJobSync) + if (!diskPriv->blockJobSync) continue; if (qemuMigrationCancelOneDriveMirror(driver, vm, disk) < 0) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 56719eb..2b3d9b5 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -1001,6 +1001,7 @@ qemuProcessHandleBlockJob(qemuMonitorPtr mon ATTRIBUTE_UNUSED, virQEMUDriverPtr driver = opaque; struct qemuProcessEvent *processEvent = NULL; virDomainDiskDefPtr disk; + qemuDomainDiskPrivatePtr diskPriv; char *data = NULL; virObjectLock(vm); @@ -1010,12 +1011,13 @@ qemuProcessHandleBlockJob(qemuMonitorPtr mon ATTRIBUTE_UNUSED, if (!(disk = qemuProcessFindDomainDiskByAlias(vm, diskAlias))) goto error; + diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); - if (disk->blockJobSync) { - disk->blockJobType = type; - disk->blockJobStatus = status; + if (diskPriv->blockJobSync) { + diskPriv->blockJobType = type; + diskPriv->blockJobStatus = status; /* We have an SYNC API waiting for this event, dispatch it back */ - virCondSignal(&disk->blockJobSyncCond); + virCondSignal(&diskPriv->blockJobSyncCond); } else { /* there is no waiting SYNC API, dispatch the update to a thread */ if (VIR_ALLOC(processEvent) < 0) @@ -5063,9 +5065,10 @@ void qemuProcessStop(virQEMUDriverPtr driver, /* Wake up anything waiting on synchronous block jobs */ for (i = 0; i < vm->def->ndisks; i++) { - virDomainDiskDefPtr disk = vm->def->disks[i]; - if (disk->blockJobSync && disk->blockJobStatus == -1) - virCondSignal(&disk->blockJobSyncCond); + qemuDomainDiskPrivatePtr diskPriv = + QEMU_DOMAIN_DISK_PRIVATE(vm->def->disks[i]); + if (diskPriv->blockJobSync && diskPriv->blockJobStatus == -1) + virCondSignal(&diskPriv->blockJobSyncCond); } if ((logfile = qemuDomainCreateLog(driver, vm, true)) < 0) { -- 2.4.0

Instead of redoing the same filtering over and over everytime we need to walk through all disks which are being migrated. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 2: - make use of per-disk private data src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_migration.c | 25 ++++++++----------------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 53df1d3..a6df199 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -218,6 +218,8 @@ struct _qemuDomainDiskPrivate { int blockJobType; /* type of the block job from the event */ int blockJobStatus; /* status of the finished block job */ bool blockJobSync; /* the block job needs synchronized termination */ + + bool migrating; /* the disk is being migrated */ }; typedef enum { diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 7472b09..c4f1c48 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1745,13 +1745,7 @@ qemuMigrationCheckDriveMirror(virQEMUDriverPtr driver, virDomainDiskDefPtr disk = vm->def->disks[i]; qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); - /* skip shared, RO and source-less disks */ - if (disk->src->shared || disk->src->readonly || - !virDomainDiskGetSource(disk)) - continue; - - /* skip disks that didn't start mirroring */ - if (!diskPriv->blockJobSync) + if (!diskPriv->migrating || !diskPriv->blockJobSync) continue; /* process any pending event */ @@ -1874,17 +1868,13 @@ qemuMigrationCancelDriveMirror(virQEMUDriverPtr driver, virDomainDiskDefPtr disk = vm->def->disks[i]; qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); - /* skip shared, RO and source-less disks */ - if (disk->src->shared || disk->src->readonly || - !virDomainDiskGetSource(disk)) - continue; - - /* skip disks that didn't start mirroring */ - if (!diskPriv->blockJobSync) + if (!diskPriv->migrating || !diskPriv->blockJobSync) continue; if (qemuMigrationCancelOneDriveMirror(driver, vm, disk) < 0) return -1; + + diskPriv->migrating = false; } return 0; @@ -1945,6 +1935,7 @@ qemuMigrationDriveMirror(virQEMUDriverPtr driver, for (i = 0; i < vm->def->ndisks; i++) { virDomainDiskDefPtr disk = vm->def->disks[i]; + qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); int mon_ret; /* skip shared, RO and source-less disks */ @@ -1975,16 +1966,16 @@ qemuMigrationDriveMirror(virQEMUDriverPtr driver, qemuBlockJobSyncEnd(driver, vm, disk, NULL); goto cleanup; } + diskPriv->migrating = true; } /* Wait for each disk to become ready in turn, but check the status * for *all* mirrors to determine if any have aborted. */ for (i = 0; i < vm->def->ndisks; i++) { virDomainDiskDefPtr disk = vm->def->disks[i]; + qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); - /* skip shared, RO and source-less disks */ - if (disk->src->shared || disk->src->readonly || - !virDomainDiskGetSource(disk)) + if (!diskPriv->migrating) continue; while (disk->mirrorState != VIR_DOMAIN_DISK_MIRROR_STATE_READY) { -- 2.4.0

When cancelling drive mirror, always try to do that for all disks even if it fails for some of them. Report the first error we saw. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> --- Notes: Version 2: - rebased (context changed) src/qemu/qemu_migration.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index c4f1c48..d12b7cc 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1862,6 +1862,8 @@ static int qemuMigrationCancelDriveMirror(virQEMUDriverPtr driver, virDomainObjPtr vm) { + virErrorPtr err = NULL; + int ret = 0; size_t i; for (i = 0; i < vm->def->ndisks; i++) { @@ -1871,13 +1873,20 @@ qemuMigrationCancelDriveMirror(virQEMUDriverPtr driver, if (!diskPriv->migrating || !diskPriv->blockJobSync) continue; - if (qemuMigrationCancelOneDriveMirror(driver, vm, disk) < 0) - return -1; + if (qemuMigrationCancelOneDriveMirror(driver, vm, disk) < 0) { + ret = -1; + if (!err) + err = virSaveLastError(); + } diskPriv->migrating = false; } - return 0; + if (err) { + virSetError(err); + virFreeError(err); + } + return ret; } -- 2.4.0

On 13.05.2015 14:28, Jiri Denemark wrote:
Version 2: - move QEMU-only data from virDomainDiskDef to a private data object
Jiri Denemark (5): Add privateData to virDomainDiskDef Rename virDomainHasBlockjob as qemuDomainHasBlockjob Move QEMU-only fields from virDomainDiskDef into privateData qemu: Keep track of what disks are being migrated qemu: Don't give up on first error in qemuMigrationCancelDriverMirror
src/conf/domain_conf.c | 43 ++++------------------- src/conf/domain_conf.h | 19 +++------- src/libvirt_private.syms | 1 - src/parallels/parallels_sdk.c | 4 +-- src/qemu/qemu_blockjob.c | 48 ++++++++++++++----------- src/qemu/qemu_command.c | 4 +-- src/qemu/qemu_domain.c | 81 ++++++++++++++++++++++++++++++++++++++++++- src/qemu/qemu_domain.h | 25 +++++++++++++ src/qemu/qemu_driver.c | 15 ++++---- src/qemu/qemu_migration.c | 42 +++++++++++----------- src/qemu/qemu_process.c | 17 +++++---- src/vbox/vbox_common.c | 4 +-- src/vbox/vbox_tmpl.c | 6 ++-- src/vmx/vmx.c | 2 +- src/xenconfig/xen_sxpr.c | 6 ++-- src/xenconfig/xen_xl.c | 2 +- src/xenconfig/xen_xm.c | 4 +-- 17 files changed, 201 insertions(+), 122 deletions(-)
ACK series Michal

On Thu, May 14, 2015 at 17:55:22 +0200, Michal Privoznik wrote:
On 13.05.2015 14:28, Jiri Denemark wrote:
Version 2: - move QEMU-only data from virDomainDiskDef to a private data object
Jiri Denemark (5): Add privateData to virDomainDiskDef Rename virDomainHasBlockjob as qemuDomainHasBlockjob Move QEMU-only fields from virDomainDiskDef into privateData qemu: Keep track of what disks are being migrated qemu: Don't give up on first error in qemuMigrationCancelDriverMirror
src/conf/domain_conf.c | 43 ++++------------------- src/conf/domain_conf.h | 19 +++------- src/libvirt_private.syms | 1 - src/parallels/parallels_sdk.c | 4 +-- src/qemu/qemu_blockjob.c | 48 ++++++++++++++----------- src/qemu/qemu_command.c | 4 +-- src/qemu/qemu_domain.c | 81 ++++++++++++++++++++++++++++++++++++++++++- src/qemu/qemu_domain.h | 25 +++++++++++++ src/qemu/qemu_driver.c | 15 ++++---- src/qemu/qemu_migration.c | 42 +++++++++++----------- src/qemu/qemu_process.c | 17 +++++---- src/vbox/vbox_common.c | 4 +-- src/vbox/vbox_tmpl.c | 6 ++-- src/vmx/vmx.c | 2 +- src/xenconfig/xen_sxpr.c | 6 ++-- src/xenconfig/xen_xl.c | 2 +- src/xenconfig/xen_xm.c | 4 +-- 17 files changed, 201 insertions(+), 122 deletions(-)
ACK series
I moved the hunk from 3/5 to 2/5, and pushed this series. Thanks. Jirka
participants (2)
-
Jiri Denemark
-
Michal Privoznik