From nobody Wed Nov 27 12:38:14 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; 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 1547163648394913.6073890951208; Thu, 10 Jan 2019 15:40:48 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2B3457EBAD; Thu, 10 Jan 2019 23:40:45 +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 D7014166B8; Thu, 10 Jan 2019 23:40:44 +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 BF11F181BA1A; Thu, 10 Jan 2019 23:40:41 +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 x0ANeeeg028761 for ; Thu, 10 Jan 2019 18:40:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3DCA217CEA; Thu, 10 Jan 2019 23:40:40 +0000 (UTC) Received: from unknown0050b6a41c42.attlocal.net.com (ovpn-116-153.phx2.redhat.com [10.3.116.153]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA91460A35 for ; Thu, 10 Jan 2019 23:40:39 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Thu, 10 Jan 2019 18:40:32 -0500 Message-Id: <20190110234033.10303-2-jferlan@redhat.com> In-Reply-To: <20190110234033.10303-1-jferlan@redhat.com> References: <20190110234033.10303-1-jferlan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] qemu: Filter non SCSI hostdevs in qemuHostdevPrepareSCSIDevices 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.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 10 Jan 2019 23:40:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" When commit 1d94b3e7 added code to walk the [n]hostdevs list looking to add shared hostdevs, it should've filtered any hostdevs that were not SCSI hostdev's. Signed-off-by: John Ferlan Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_hostdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/qemu/qemu_hostdev.c b/src/qemu/qemu_hostdev.c index a487e1d3aa..4eb3f1d7f1 100644 --- a/src/qemu/qemu_hostdev.c +++ b/src/qemu/qemu_hostdev.c @@ -275,6 +275,9 @@ qemuHostdevPrepareSCSIDevices(virQEMUDriverPtr driver, for (i =3D 0; i < nhostdevs; i++) { virDomainDeviceDef dev; =20 + if (!virHostdevIsSCSIDevice(hostdevs[i])) + continue; + dev.type =3D VIR_DOMAIN_DEVICE_HOSTDEV; dev.data.hostdev =3D hostdevs[i]; =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Wed Nov 27 12:38:14 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; 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 1547163648447293.77880794244265; Thu, 10 Jan 2019 15:40:48 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0CF6AAC5E5; Thu, 10 Jan 2019 23:40:45 +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 882CB5C223; Thu, 10 Jan 2019 23:40:44 +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 6A58A1832E8F; Thu, 10 Jan 2019 23:40:42 +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 x0ANeeLe028766 for ; Thu, 10 Jan 2019 18:40:40 -0500 Received: by smtp.corp.redhat.com (Postfix) id ADE2417CEA; Thu, 10 Jan 2019 23:40:40 +0000 (UTC) Received: from unknown0050b6a41c42.attlocal.net.com (ovpn-116-153.phx2.redhat.com [10.3.116.153]) by smtp.corp.redhat.com (Postfix) with ESMTP id 66F9F60A35 for ; Thu, 10 Jan 2019 23:40:40 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Thu, 10 Jan 2019 18:40:33 -0500 Message-Id: <20190110234033.10303-3-jferlan@redhat.com> In-Reply-To: <20190110234033.10303-1-jferlan@redhat.com> References: <20190110234033.10303-1-jferlan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/2] qemu: Remove virHostdevIsSCSIDevice from qemuIsSharedHostdev 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 10 Jan 2019 23:40:45 +0000 (UTC) Content-Type: text/plain; charset="utf-8" It's essentially dead code. The only way hostdev->shareable can be true is during virDomainHostdevDefParseXML when the result of virHostdevIsSCSIDevice is true. Signed-off-by: John Ferlan --- src/qemu/qemu_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index 20952e9607..945725566c 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -1438,8 +1438,7 @@ static bool qemuIsSharedHostdev(virDomainHostdevDefPtr hostdev) { return (hostdev->shareable && - (virHostdevIsSCSIDevice(hostdev) && - hostdev->source.subsys.u.scsi.protocol !=3D + (hostdev->source.subsys.u.scsi.protocol !=3D VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_ISCSI)); } =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list