[libvirt] [PATCH v2 2/8] qemu: Simplify qemuMigrationFinish
Jiri Denemark
jdenemar at redhat.com
Fri Sep 18 10:56:10 UTC 2015
On Thu, Sep 17, 2015 at 17:45:26 -0400, John Ferlan wrote:
>
>
> On 09/11/2015 09:26 AM, Jiri Denemark wrote:
> > Offline migration migration is quite special because we don't really
> > need to do anything but make the domain persistent. Let's do it
> > separately from normal migration to avoid cluttering the code with
> > !(flags & VIR_MIGRATE_OFFLINE).
> >
> > Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> > ---
> >
> > Notes:
> > Version 2:
> > - rebased on top of changed patch 1 (context conflict)
> >
> > src/qemu/qemu_migration.c | 72 +++++++++++++++++++++++------------------------
> > 1 file changed, 36 insertions(+), 36 deletions(-)
> >
> > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
> > index b9e0c22..48a4476 100644
> > --- a/src/qemu/qemu_migration.c
> > +++ b/src/qemu/qemu_migration.c
> > @@ -5660,8 +5660,14 @@ qemuMigrationFinish(virQEMUDriverPtr driver,
> > /* Did the migration go as planned? If yes, return the domain
> > * object, but if no, clean up the empty qemu process.
> > */
> > - if (retcode == 0) {
> > - if (!virDomainObjIsActive(vm) && !(flags & VIR_MIGRATE_OFFLINE)) {
> > + if (flags & VIR_MIGRATE_OFFLINE) {
> > + if (retcode != 0 ||
> > + qemuMigrationPersist(driver, vm, mig) < 0)
> > + goto endjob;
> > +
>
> Should this path also update mig->jobInfo if it exists? That would have
> been done previously
It doesn't really make a lot of sense to do anything with jobInfo during
offline migration.
Jirka
More information about the libvir-list
mailing list