[libvirt] [PATCH] Split virDomainMigrate into functions.

Daniel P. Berrange berrange at redhat.com
Fri Jul 31 15:08:00 UTC 2009


On Fri, Jul 31, 2009 at 03:19:56PM +0200, Chris Lalancette wrote:
> Re-factor virDomainMigrate to split out the version 1 and version 2
> protocols into their own functions.  In reality, the two versions share
> very little in common, so forcing them together in the same function was
> just confusing.  This will also make adding tunnelled migration easier.
> 
> Signed-off-by: Chris Lalancette <clalance at redhat.com>
> ---
>  src/libvirt.c |  258 ++++++++++++++++++++++++++++++++++-----------------------
>  1 files changed, 155 insertions(+), 103 deletions(-)
> 

>  
>  
> +static virDomainPtr
> +migrate_version_1 (virDomainPtr domain,
> +                   virConnectPtr dconn,
> +                   unsigned long flags,
> +                   const char *dname,
> +                   const char *uri,
> +                   unsigned long bandwidth)


> +static virDomainPtr
> +migrate_version_2 (virDomainPtr domain,
> +                   virConnectPtr dconn,
> +                   unsigned long flags,
> +                   const char *dname,
> +                   const char *uri,
> +                   unsigned long bandwidth)


>   * @domain: a domain object
> @@ -2930,140 +3070,52 @@ virDomainMigrate (virDomainPtr domain,
>                    const char *uri,
>                    unsigned long bandwidth)
>  {


ACK, but I'd prefer we didn't invent a new naming convention here,
just do it as virDomainMigrateVersion2.

Please hold off committing this patch till after the 0.7.0 release.
The rest of the bug fixes in this series can be applied now though

Regards,
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|




More information about the libvir-list mailing list