From nobody Wed May 14 12:38:33 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1523457824062602.5157497102593; Wed, 11 Apr 2018 07:43:44 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BAD0858; Wed, 11 Apr 2018 14:43:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9390178BA5; Wed, 11 Apr 2018 14:43:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5CD11181D0A0; Wed, 11 Apr 2018 14:43:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w3BEgHeg008948 for ; Wed, 11 Apr 2018 10:42:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id 89038946D5; Wed, 11 Apr 2018 14:42:17 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 67F58AB3E5 for ; Wed, 11 Apr 2018 14:42:17 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 3D296100D57; Wed, 11 Apr 2018 16:42:11 +0200 (CEST) From: Jiri Denemark To: libvir-list@redhat.com Date: Wed, 11 Apr 2018 16:42:00 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: Mail-Followup-To: libvir-list@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 70/73] qemu: Drop priv->job.postcopyEnabled bool X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 11 Apr 2018 14:43:43 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We store the flags passed to the API which started the migration. Let's use them instead of a separate bool to check if post-copy migration was requested. Signed-off-by: Jiri Denemark Reviewed-by: J=EF=BF=BDn Tomko --- src/qemu/qemu_domain.c | 1 - src/qemu/qemu_domain.h | 1 - src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_migration.c | 4 ---- 4 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 9343f41f57..71c3a917c1 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -332,7 +332,6 @@ qemuDomainObjResetAsyncJob(qemuDomainObjPrivatePtr priv) job->abortJob =3D false; job->spiceMigration =3D false; job->spiceMigrated =3D false; - job->postcopyEnabled =3D false; job->dumpCompleted =3D false; VIR_FREE(job->error); VIR_FREE(job->current); diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 8d608da121..91385da2a9 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -176,7 +176,6 @@ struct _qemuDomainJobObj { bool spiceMigration; /* we asked for spice migration an= d we * should wait for it to finish */ bool spiceMigrated; /* spice migration completed */ - bool postcopyEnabled; /* post-copy migration was enabled= */ char *error; /* job event completion error */ bool dumpCompleted; /* dump completed */ =20 diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 3fac038583..1b37c0b45a 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -13840,7 +13840,7 @@ qemuDomainMigrateStartPostCopy(virDomainPtr dom, goto endjob; } =20 - if (!priv->job.postcopyEnabled) { + if (!(priv->job.apiFlags & VIR_MIGRATE_POSTCOPY)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("switching to post-copy requires migration to be " "started with VIR_MIGRATE_POSTCOPY flag")); diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 431875c762..ad87aebd3b 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2406,8 +2406,6 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver, migParams) < 0) goto stopjob; =20 - priv->job.postcopyEnabled =3D flags & VIR_MIGRATE_POSTCOPY; - if (mig->nbd && flags & (VIR_MIGRATE_NON_SHARED_DISK | VIR_MIGRATE_NON_SHARED_INC)= && virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_NBD_SERVER)) { @@ -3346,8 +3344,6 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver, migParams) < 0) goto error; =20 - priv->job.postcopyEnabled =3D flags & VIR_MIGRATE_POSTCOPY; - if (migrate_flags & (QEMU_MONITOR_MIGRATE_NON_SHARED_DISK | QEMU_MONITOR_MIGRATE_NON_SHARED_INC)) { if (mig->nbd) { --=20 2.17.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list