From nobody Wed Feb 11 02:54:55 2026 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 1498220245817115.6750502642459; Fri, 23 Jun 2017 05:17:25 -0700 (PDT) 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 76EC8285B1; Fri, 23 Jun 2017 12:17:23 +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 EFA0052351; Fri, 23 Jun 2017 12:17:22 +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 E44FC184383F; Fri, 23 Jun 2017 12:17:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v5NCGiNa012779 for ; Fri, 23 Jun 2017 08:16:44 -0400 Received: by smtp.corp.redhat.com (Postfix) id 145481751E; Fri, 23 Jun 2017 12:16:44 +0000 (UTC) Received: from angien.brq.redhat.com (unknown [10.43.2.201]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F8C91754E; Fri, 23 Jun 2017 12:16:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 76EC8285B1 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 76EC8285B1 From: Peter Krempa To: libvir-list@redhat.com Date: Fri, 23 Jun 2017 14:16:45 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH v2 1/2] 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.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 23 Jun 2017 12:17:24 +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