mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 06:05:27 +00:00
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:
parent
dd428d4798
commit
6f84e110d6
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user