forked from pool/libvirt
48 lines
1.6 KiB
Diff
48 lines
1.6 KiB
Diff
commit 6f84e110d61e6e99ee80809f1d3c2c6dde352965
|
|
Author: Jim Fehlig <jfehlig@novell.com>
|
|
Date: Fri Aug 26 12:10:22 2011 -0600
|
|
|
|
Store max migration bandwidth in qemuDomainObjPrivate struct
|
|
|
|
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.
|
|
|
|
Index: libvirt-0.9.4/src/qemu/qemu_domain.c
|
|
===================================================================
|
|
--- libvirt-0.9.4.orig/src/qemu/qemu_domain.c
|
|
+++ libvirt-0.9.4/src/qemu/qemu_domain.c
|
|
@@ -215,6 +215,8 @@ static void *qemuDomainObjPrivateAlloc(v
|
|
if (qemuDomainObjInitJob(priv) < 0)
|
|
VIR_FREE(priv);
|
|
|
|
+ priv->migMaxBandwidth = QEMU_DOMAIN_DEFAULT_MIG_BANDWIDTH_MAX;
|
|
+
|
|
return priv;
|
|
}
|
|
|
|
Index: libvirt-0.9.4/src/qemu/qemu_domain.h
|
|
===================================================================
|
|
--- libvirt-0.9.4.orig/src/qemu/qemu_domain.h
|
|
+++ libvirt-0.9.4/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,8 @@ struct _qemuDomainObjPrivate {
|
|
char *lockState;
|
|
|
|
bool fakeReboot;
|
|
+
|
|
+ unsigned long migMaxBandwidth;
|
|
};
|
|
|
|
struct qemuDomainWatchdogEvent
|