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.
This commit is contained in:
Jim Fehlig 2011-08-26 12:10:22 -06:00 committed by Jim Fehlig
parent dd428d4798
commit 6f84e110d6
2 changed files with 7 additions and 0 deletions

View File

@ -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;
}

View File

@ -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) | \
@ -115,6 +118,8 @@ struct _qemuDomainObjPrivate {
bool fakeReboot;
int jobs_queued;
unsigned long migMaxBandwidth;
};
struct qemuDomainWatchdogEvent