Re: [PATCH] setmem: provide dummy impls for remaining drivers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2011/3/10 Eric Blake <eblake@xxxxxxxxxx>:
> * src/esx/esx_driver.c (esxDomainSetMemory): Move guts...
> (esxDomainSetMemoryFlags): ...here.
> * src/lxc/lxc_driver.c (lxcDomainSetMemory)
> (lxcDomainSetMemoryFlags): Likewise.
> * src/test/test_driver.c (testSetMemory, testSetMemoryFlags):
> Likewise.
> * src/uml/uml_driver.c (umlDomainSetMemory)
> (umlDomainSetMemoryFlags): Likewise.
> * src/vbox/vbox_tmpl.c (vboxDomainSetMemory)
> (vboxDomainSetMemoryFlags): Likewise.
> * src/xen/xen_driver.c (xenUnifiedDomainSetMemory)
> (xenUnifiedDomainSetMemoryFlags): Likewise.
> ---
>
>> Hmm, for other API additions, I have provided dummy wrappers for the new
>> function anywhere the old function existed, that merely require the same
>> flags as the old function would use. ÂI'll probably propose that as a
>> followup patch.
>
> Like so.
>
> Âsrc/esx/esx_driver.c  |  17 ++++++++++++++---
> Âsrc/lxc/lxc_driver.c  |  15 +++++++++++++--
> Âsrc/test/test_driver.c | Â 19 ++++++++++++++++---
> Âsrc/uml/uml_driver.c  |  15 +++++++++++++--
> Âsrc/vbox/vbox_tmpl.c  |  15 +++++++++++++--
> Âsrc/xen/xen_driver.c  |  15 ++++++++++++++-
> Â6 files changed, 83 insertions(+), 13 deletions(-)
>
> diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
> index 37e104e..a2d8433 100644
> --- a/src/esx/esx_driver.c
> +++ b/src/esx/esx_driver.c
> @@ -2111,7 +2111,8 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
>
>
> Âstatic int
> -esxDomainSetMemory(virDomainPtr domain, unsigned long memory)
> +esxDomainSetMemoryFlags(virDomainPtr domain, unsigned long memory,
> + Â Â Â Â Â Â Â Â Â Â Â Âunsigned int flags)
> Â{
> Â Â int result = -1;
> Â Â esxPrivate *priv = domain->conn->privateData;
> @@ -2121,6 +2122,12 @@ esxDomainSetMemory(virDomainPtr domain, unsigned long memory)
> Â Â esxVI_TaskInfoState taskInfoState;
> Â Â char *taskInfoErrorMessage = NULL;
>
> + Â Âif (flags != VIR_DOMAIN_MEM_LIVE) {
> + Â Â Â ÂESX_ERROR(VIR_ERR_INVALID_ARG,
> + Â Â Â Â Â Â Â Â Â_("invalid flag combination: (0x%x)"), flags);
> + Â Â Â Âreturn -1;
> + Â Â}
> +

Actually this doesn't match with what ESX really does. There is no
such thing like distinct values for _LIVE and _CONFIG. Changing the
memory value always affects a running domain and is persistent at the
same time.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]