On Thu, Mar 17, 2016 at 17:58:48 +0300, Nikolay Shirokovskiy wrote: > Mostly it is just passing new parameter here and there. In case > of zero value we fallback to auto selecting port and thus keep > backward compatibility. > > Also we need to fix places of auto selected port managment. > We should bother only when auto selected was done that is > when externally specified port is not 0. > > Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@xxxxxxxxxxxxx> > --- > src/qemu/qemu_driver.c | 25 ++++++++----- > src/qemu/qemu_migration.c | 92 ++++++++++++++++++++++++++++++++++------------- > src/qemu/qemu_migration.h | 3 ++ > 3 files changed, 87 insertions(+), 33 deletions(-) Just a few nits... > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c > index 38fa81c..0a807a2 100644 > --- a/src/qemu/qemu_migration.c > +++ b/src/qemu/qemu_migration.c .. > @@ -3568,6 +3581,11 @@ qemuMigrationPrepareAny(virQEMUDriverPtr driver, > > if (autoPort) > priv->migrationPort = port; > + /* in this case port is autoselected and we don't need to manage it anymore > + * after cookie is baked I believe you wanted to say the port is *not* auto selected (we need to manage it otherwise). > + */ > + if (nbdPort != 0) > + priv->nbdPort = 0; > ret = 0; > > cleanup: ... > @@ -4966,6 +4990,11 @@ doPeer2PeerMigrate3(virQEMUDriverPtr driver, > VIR_MIGRATE_PARAM_MIGRATE_DISKS, > migrate_disks[i]) < 0) > goto cleanup; > + if (nbdPort && > + virTypedParamsAddInt(¶ms, &nparams, &maxparams, > + VIR_MIGRATE_PARAM_DISKS_PORT, > + nbdPort) < 0) > + goto cleanup; Wrong indentation. > } > > if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_PAUSED) Jirka -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list