From nobody Mon Apr 29 09:36:23 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.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 1498038904330885.4207911516437; Wed, 21 Jun 2017 02:55:04 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3DFAD4025E; Wed, 21 Jun 2017 09:55:02 +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 AC30C7E2DB; Wed, 21 Jun 2017 09:55:01 +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 3DE074E982; Wed, 21 Jun 2017 09:55:00 +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 v5L9swmZ009652 for ; Wed, 21 Jun 2017 05:54:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id BAB5F6BF6C; Wed, 21 Jun 2017 09:54:58 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 170796BF6D; Wed, 21 Jun 2017 09:54:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3DFAD4025E Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3DFAD4025E From: Peter Krempa To: libvir-list@redhat.com Date: Wed, 21 Jun 2017 11:55:02 +0200 Message-Id: <5fb3e448c610b7c581c0bc88e33c257c3c809aa1.1498038902.git.pkrempa@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH] Revert "qemu: Check duplicate WWNs also for hotplugged disks" 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.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 21 Jun 2017 09:55:03 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Similarly to commit 5da28cc3069b573f54f0bcaf8eb75476bcfdc6e9 this check actually does not make sense since duplicate WWNs are used e.g. when multipathing disks. This reverts commit 780fe4e4baf7e2f10f65ba1a34f9274fc547cad2. --- src/conf/domain_conf.c | 37 ------------------------------------- 1 file changed, 37 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0409c62ef..fdf85d5dd 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -25510,34 +25510,6 @@ virDomainDeviceInfoCheckBootIndex(virDomainDefPtr = def ATTRIBUTE_UNUSED, return 0; } - -/** - * virDomainDefGetDiskByWWN: - * @def: domain definition - * @wwn: wwn of a disk to find - * - * Returns a disk definition pointer corresponding to the given WWN identi= fier - * or NULL either if @wwn was NULL or if disk with given WWN is not presen= t in - * the domain definition. - */ -static virDomainDiskDefPtr -virDomainDefGetDiskByWWN(virDomainDefPtr def, - const char *wwn) -{ - size_t i; - - if (!wwn) - return NULL; - - for (i =3D 0; i < def->ndisks; i++) { - if (STREQ_NULLABLE(def->disks[i]->wwn, wwn)) - return def->disks[i]; - } - - return NULL; -} - - int virDomainDefCompatibleDevice(virDomainDefPtr def, virDomainDeviceDefPtr dev, @@ -25581,15 +25553,6 @@ virDomainDefCompatibleDevice(virDomainDefPtr def, } } - if (dev->type =3D=3D VIR_DOMAIN_DEVICE_DISK) { - if (!!virDomainDefGetDiskByWWN(def, dev->data.disk->wwn)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("Domain already has a disk with wwn '%s'"), - dev->data.disk->wwn); - return -1; - } - } - return 0; } --=20 2.12.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list