[libvirt] [PATCH 3/3] Wire up virDomainMigrateSetSpeed into QEMU driver
Daniel P. Berrange
berrange at redhat.com
Tue Mar 22 11:04:49 UTC 2011
On Mon, Mar 21, 2011 at 12:07:12PM -0600, Eric Blake wrote:
> On 03/21/2011 10:13 AM, Daniel P. Berrange wrote:
> > Enhance the QEMU migration monitoring loop, so that it can get
> > a signal to change migration speed on the fly
> >
> > * src/qemu/qemu_domain.h: Add signal for changing speed on the fly
> > * src/qemu/qemu_driver.c: Wire up virDomainMigrateSetSpeed driver
> > * src/qemu/qemu_migration.c: Support signal for changing speed
> > ---
> > src/qemu/qemu_domain.h | 2 +
> > src/qemu/qemu_driver.c | 51 ++++++++++++++++++++++++++++++++++++++++++++-
> > src/qemu/qemu_migration.c | 11 +++++++++
> > 3 files changed, 63 insertions(+), 1 deletions(-)
> >
> > diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h
> > index ebb2050..8258900 100644
> > --- a/src/qemu/qemu_domain.h
> > +++ b/src/qemu/qemu_domain.h
> > @@ -45,10 +45,12 @@ enum qemuDomainJobSignals {
> > QEMU_JOB_SIGNAL_CANCEL = 1 << 0, /* Request job cancellation */
> > QEMU_JOB_SIGNAL_SUSPEND = 1 << 1, /* Request VM suspend to finish live migration offline */
> > QEMU_JOB_SIGNAL_MIGRATE_DOWNTIME = 1 << 2, /* Request migration downtime change */
> > + QEMU_JOB_SIGNAL_MIGRATE_SPEED = 1 << 3, /* Request migration speed change */
>
> Makes it easy to review when you've already got a similar feature to
> copy from :)
>
> > +++ b/src/qemu/qemu_driver.c
> > @@ -6071,6 +6071,55 @@ cleanup:
> > return ret;
> > }
> >
> > +static int
> > +qemuDomainMigrateSetMaxSpeed(virDomainPtr dom,
> > + unsigned long bandwidth,
>
> Same question as in patch 1 and 2 about whether 'int' is better than
> 'long' for this parameter.
Again, done for consistency with the existing APIs
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