From nobody Thu Apr 25 15:15:04 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1559296139; cv=none; d=zoho.com; s=zohoarc; b=k9jsXj6tJfFnkM3AMjvbNiJYjyet9XYz5R+45AkNB2AHGooEtfceVBxcA+bvH+M8k/uSrRJ0xpzusVfvY14VoY5ZejzdGsE4nSzoFq/i2twDyjsV59WFRmICQO2DiFdOIGFhLfYzxGu8Qgtz7XGcoXaKpxjM3MfcFO6QSPmJxDw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1559296139; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=MiQBoayNmLGVMTdc+mcpN9mNrqX/Ohq+3GyArcVgZz8=; b=EAs/2+IRIMjjREcMA0NIZI14cKqzC+xEI1T2gSI5ZeckrQai0zzXLqptYmvZIkI8pJ1bY4xREf82JraZQeI8ZBJrQfgZhDvvFfUTvy1ntlo1LdjQdTshEqf88XBGxS6k4lv5gqJbG3/QW5nexQ7cjF/Jfml4ExPI3oUGkMAAQWY= ARC-Authentication-Results: i=1; mx.zoho.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 1559296139111969.3963664142163; Fri, 31 May 2019 02:48:59 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EA3E83078AB1; Fri, 31 May 2019 09:48:34 +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 947A55D6A6; Fri, 31 May 2019 09:48:25 +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 CC71D4EBD7; Fri, 31 May 2019 09:48:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x4V9m1Qr020186 for ; Fri, 31 May 2019 05:48:01 -0400 Received: by smtp.corp.redhat.com (Postfix) id 427C44FA30; Fri, 31 May 2019 09:48:01 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3BB785D721; Fri, 31 May 2019 09:47:59 +0000 (UTC) Received: from huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 19F72C023B; Fri, 31 May 2019 09:47:47 +0000 (UTC) Received: from DGGEML403-HUB.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id 35F98EC1BBF173276EF5; Fri, 31 May 2019 17:47:44 +0800 (CST) Received: from localhost.localdomain (10.175.104.211) by DGGEML403-HUB.china.huawei.com (10.3.17.33) with Microsoft SMTP Server id 14.3.439.0; Fri, 31 May 2019 17:47:38 +0800 From: Jie Wang To: Date: Fri, 31 May 2019 15:33:31 +0800 Message-ID: <1559288011-60350-1-git-send-email-wangjie88@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.104.211] X-CFilter-Loop: Reflected X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 216 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 31 May 2019 09:47:47 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 31 May 2019 09:47:47 +0000 (UTC) for IP:'45.249.212.189' DOMAIN:'szxga03-in.huawei.com' HELO:'huawei.com' FROM:'wangjie88@huawei.com' RCPT:'' X-RedHat-Spam-Score: -0.002 (SPF_HELO_PASS, SPF_PASS) 45.249.212.189 szxga03-in.huawei.com 45.249.212.189 szxga03-in.huawei.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.39 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: mprivozn@redhat.com, eric.fangyi@huawei.com, pkrempa@redhat.comm, wangjie88@huawei.com Subject: [libvirt] [PATCH v2] qemu: fix pr-helper0 remain 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: , 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Fri, 31 May 2019 09:48:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" If libvirt receive DISCONNECTED event and set prDaemonRunning to false, and qemuDomainRemoveDiskDevice is performing in the meantime. qemuDomainRemoveDiskDevice will return directly by prDaemonRunning check, so the pr-helper0 object will remain. In that case we should try harder and also kill the pr-helper process, so qemuProcessKillManagedPRDaemon could use the same treatment. Signed-off-by: Jie Wang --- src/qemu/qemu_hotplug.c | 3 +-- src/qemu/qemu_process.c | 3 --- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 34249bd..5e4a929 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -465,8 +465,7 @@ qemuHotplugRemoveManagedPR(virQEMUDriverPtr driver, virErrorPtr orig_err; int ret =3D -1; =20 - if (!priv->prDaemonRunning || - virDomainDefHasManagedPR(vm->def)) + if (virDomainDefHasManagedPR(vm->def)) return 0; =20 virErrorPreserveLast(&orig_err); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 47d8ca2..8070a09 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2746,9 +2746,6 @@ qemuProcessKillManagedPRDaemon(virDomainObjPtr vm) virErrorPtr orig_err; char *pidfile; =20 - if (!priv->prDaemonRunning) - return; - if (!(pidfile =3D qemuProcessBuildPRHelperPidfilePath(vm))) { VIR_WARN("Unable to construct pr-helper pidfile path"); return; --=20 2.8.3.windows.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list