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

Eric Blake eblake at redhat.com
Wed Apr 13 16:15:34 UTC 2011


On 03/10/2011 03:53 PM, Eric Blake wrote:
> * src/esx/esx_driver.c (esxDomainSetMemory): Move guts...
> (esxDomainSetMemoryFlags): ...here.

> 
>> 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)

I haven't revisited this patch since the rest of the setmem/setmaxmem
changes went in, but we really should look at getting the rest of the
hypervisors to support the new SetMemoryFlags API (even if only for the
single flag combination that they previously supported).

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110413/d29cfcd6/attachment-0001.sig>


More information about the libvir-list mailing list