[libvirt] [PATCH 3/3] Wire up virDomainMigrateSetSpeed into QEMU driver

Eric Blake eblake at redhat.com
Mon Mar 21 18:07:12 UTC 2011


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.

ACK.

-- 
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: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110321/f9c5e50f/attachment-0001.sig>


More information about the libvir-list mailing list