Re: [PATCH v3 08/10] qemu: remove virConnectPtr in some migration methods

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 02/16/2018 06:22 AM, Daniel P. Berrangé wrote:
> The qemuMigrationPrecreateStorage method needs a connection
> to access the storage driver. Instead of passing it around,
> open it at time of use.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
> ---
>  src/qemu/qemu_driver.c    | 16 +++++++--------
>  src/qemu/qemu_migration.c | 51 ++++++++++++++++++++++-------------------------
>  src/qemu/qemu_migration.h |  4 +---
>  3 files changed, 33 insertions(+), 38 deletions(-)
> 

[...]

>  
> diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> index 312d717617..6edadac719 100644
> --- a/src/qemu/qemu_migration.c
> +++ b/src/qemu/qemu_migration.c

[...]

>  static int doPeer2PeerMigrate2(virQEMUDriverPtr driver,
> -                               virConnectPtr sconn ATTRIBUTE_UNUSED,
> +                               virConnectPtr sconn,

I know this has an impact in later patches too, but @sconn is only used
for (duplicated) debug prints...

>                                 virConnectPtr dconn,
>                                 virDomainObjPtr vm,
>                                 const char *dconnuri,
> @@ -4654,7 +4651,7 @@ doPeer2PeerMigrate3(virQEMUDriverPtr driver,

Same here it seems.  Removing affects the calling stack a bit, but I
think would be the right thing to do.


Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>

John

>      cookieinlen = cookieoutlen;
>      cookieout = NULL;
>      cookieoutlen = 0;
> -    ret = qemuMigrationConfirmPhase(driver, sconn, vm,
> +    ret = qemuMigrationConfirmPhase(driver, vm,
>                                      cookiein, cookieinlen,
>                                      flags, cancelled);
>      /* If Confirm3 returns -1, there's nothing more we can

[...]

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux