From nobody Thu May 15 11:39:16 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1510235886893233.29958484008807; Thu, 9 Nov 2017 05:58:06 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EF1A268A2; Thu, 9 Nov 2017 13:58:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CCED16F977; Thu, 9 Nov 2017 13:58:04 +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 956BD3D3D3; Thu, 9 Nov 2017 13:58:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vA9Dvk4r010123 for ; Thu, 9 Nov 2017 08:57:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id 62F126F973; Thu, 9 Nov 2017 13:57:46 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5CB6D6F96B for ; Thu, 9 Nov 2017 13:57:44 +0000 (UTC) Received: from relay.sw.ru (mailhub.sw.ru [195.214.232.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B4912C04BD4E for ; Thu, 9 Nov 2017 13:57:43 +0000 (UTC) Received: from dim-vz7.qa.sw.ru (msk-vpn.virtuozzo.com [195.214.232.6]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id vA9DJWRC009796 for ; Thu, 9 Nov 2017 16:19:32 +0300 (MSK) From: Nikolay Shirokovskiy To: libvir-list@redhat.com Date: Thu, 9 Nov 2017 16:18:50 +0300 Message-Id: <1510233537-848259-5-git-send-email-nshirokovskiy@virtuozzo.com> In-Reply-To: <1510233537-848259-1-git-send-email-nshirokovskiy@virtuozzo.com> References: <1510233537-848259-1-git-send-email-nshirokovskiy@virtuozzo.com> X-Greylist: Delayed for 00:38:03 by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 09 Nov 2017 13:57:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 09 Nov 2017 13:57:44 +0000 (UTC) for IP:'195.214.232.25' DOMAIN:'mailhub.sw.ru' HELO:'relay.sw.ru' FROM:'nshirokovskiy@virtuozzo.com' RCPT:'' X-RedHat-Spam-Score: -0.001 (SPF_PASS) 195.214.232.25 mailhub.sw.ru 195.214.232.25 mailhub.sw.ru X-Scanned-By: MIMEDefang 2.78 on 10.5.110.31 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 04/11] qemu: remove nested job usage from qemuProcessStop 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 09 Nov 2017 13:58:05 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 81f50cb92 added getting nested job on stopping domain to prevent leaking of monitor object on race between aborting job and stopping domain cased by th= at abort. One of the causes of this problem is that async job and concurrent regular = job were not fully isolated and async job can continue to run when concurrent j= ob is not finished yet. Now this is not possible and we can safely remove gett= ing nested job condition in qemuProcessStop as stopping always done within cont= ext of some job. --- src/qemu/qemu_process.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 24b7ba1..7eaeeaa 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -6296,19 +6296,9 @@ void qemuProcessStop(virQEMUDriverPtr driver, * reporting so we don't squash a legit error. */ orig_err =3D virSaveLastError(); =20 - if (asyncJob !=3D QEMU_ASYNC_JOB_NONE) { - if (qemuDomainObjBeginNestedJob(driver, vm, asyncJob) < 0) - goto cleanup; - } else if (priv->job.asyncJob !=3D QEMU_ASYNC_JOB_NONE && - priv->job.asyncOwner =3D=3D virThreadSelfID() && - priv->job.active !=3D QEMU_JOB_ASYNC_NESTED) { - VIR_WARN("qemuProcessStop called without a nested job (async=3D%s)= ", - qemuDomainAsyncJobTypeToString(asyncJob)); - } - if (!virDomainObjIsActive(vm)) { VIR_DEBUG("VM '%s' not active", vm->def->name); - goto endjob; + goto cleanup; } =20 qemuProcessBuildDestroyMemoryPaths(driver, vm, NULL, false); @@ -6565,10 +6555,6 @@ void qemuProcessStop(virQEMUDriverPtr driver, =20 virDomainObjRemoveTransientDef(vm); =20 - endjob: - if (asyncJob !=3D QEMU_ASYNC_JOB_NONE) - qemuDomainObjEndJob(driver, vm); - cleanup: if (orig_err) { virSetError(orig_err); --=20 1.8.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list