[libvirt] [PATCH] setmem: provide dummy impls for remaining drivers
Daniel P. Berrange
berrange at redhat.com
Fri Mar 11 15:36:53 UTC 2011
On Fri, Mar 11, 2011 at 08:26:43AM -0700, Eric Blake wrote:
> On 03/10/2011 03:53 PM, Eric Blake wrote:
> >> 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 ++++++++++++++-
>
> Hmm, re-reading this patch exposes a problem (existing before this
> patch, and this patch doesn't change the situation):
>
> In 0.8.8, 'virsh setmem' on xen:/// meant:
> if guest is live, then affect live (only); otherwise affect config
>
> But with this patch, 'virsh setmem --live' will _still_ affect a config.
>
> What we need is three flags instead of two:
>
> VIR_DOMAIN_MEM_LIVE
> VIR_DOMAIN_MEM_CONFIG
> VIR_DOMAIN_MEM_CURRENT - use LIVE or CONFIG according to domain state
>
> where we document that virDomainSetMemory is hypervisor-defined whether
> it implies CURRENT (xen) or LIVE (qemu), and where
> virDomainSetMemoryFlags properly honors all three flags for both
> hypervisors.
Ideally VIR_DOMAIN_MEM_CURRENT would have value 0 and thus be
the default. So the new API default matches the old API
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list