From: Jim Fehlig <jfehlig@xxxxxxxxxx> The maximum bandwidth that can be consumed when migrating a domain is better classified as an operational vs configuration parameter of the dommain. As such, store this parameter in qemuDomainObjPrivate structure. --- src/qemu/qemu_domain.c | 2 ++ src/qemu/qemu_domain.h | 4 ++++ 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 675c6df..f4110c7 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -215,6 +215,8 @@ static void *qemuDomainObjPrivateAlloc(void) if (qemuDomainObjInitJob(priv) < 0) VIR_FREE(priv); + priv->migMaxBandwidth = QEMU_DOMAIN_DEFAULT_MIG_BANDWIDTH_MAX; + return priv; } diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index e12ca8e..2aeed43 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -36,6 +36,9 @@ (1 << VIR_DOMAIN_VIRT_KVM) | \ (1 << VIR_DOMAIN_VIRT_XEN)) +# define QEMU_DOMAIN_DEFAULT_MIG_BANDWIDTH_MAX (32 << 20) +# define QEMU_DOMAIN_FILE_MIG_BANDWIDTH_MAX (INT64_MAX / (1024 * 1024)) + # define JOB_MASK(job) (1 << (job - 1)) # define DEFAULT_JOB_MASK \ (JOB_MASK(QEMU_JOB_QUERY) | \ @@ -113,6 +116,7 @@ struct _qemuDomainObjPrivate { char *lockState; bool fakeReboot; + unsigned long migMaxBandwidth; }; struct qemuDomainWatchdogEvent -- 1.7.5.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list