From nobody Mon Feb 9 12:09:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1610359078; cv=none; d=zohomail.com; s=zohoarc; b=B89B7br7VQNpWI61RQHHXznDQJ56toqPX6aw3Nalzzi56T7GBJRCZ6z/+KLTUIODS8uGQ9kwam3qXiZDTSeRr39wD3BS8az4mKyAqjHzL0RkPBpE+uZCt+SeeKROGgi/b2hYHAe/UM5F5xah5KocqUop2AnDaIOU7Rt62gann1A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610359078; h=Content-Type:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=5KCVxMUh1gcJmjOCSIAM+VhDhMryXMRpurBMJBxxKlU=; b=aLQnz/2XEEW70DJSQFsz+GZz5z1QmQQnf2M8b62jx4JNmkFbaa5NuheoP0h6zQWCzfumFSO1r3pti/+Q3VL8d6cgqQAh9I894mtzeV/p8nyg9nXv9rJMnvUHEQrVZMqhE1LtT6OzCrQo1DHwXqwce1bcRIUBBQPUGBkNs8ZxDY8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 161035907818347.91838761984354; Mon, 11 Jan 2021 01:57:58 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-80-1sHZTNLDOQmdFG9ohRFe_g-1; Mon, 11 Jan 2021 04:57:53 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 937DF180E469; Mon, 11 Jan 2021 09:57:48 +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 6A32F6A8FE; Mon, 11 Jan 2021 09:57:48 +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 2D79D5002D; Mon, 11 Jan 2021 09:57:48 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10B9vkGu015024 for ; Mon, 11 Jan 2021 04:57:46 -0500 Received: by smtp.corp.redhat.com (Postfix) id AA4442166B28; Mon, 11 Jan 2021 09:57:46 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A530E2166B2D for ; Mon, 11 Jan 2021 09:57:43 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 16381101A564 for ; Mon, 11 Jan 2021 09:57:43 +0000 (UTC) Received: from relay3.sw.ru (relay.sw.ru [185.231.240.75]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-473-_2WSC-VSPNiQ3cgSE6xenQ-1; Mon, 11 Jan 2021 04:57:40 -0500 Received: from [10.28.15.168] (helo=vz7.sw.ru.) by relay3.sw.ru with esmtp (Exim 4.94) (envelope-from ) id 1kytw8-00GBOE-A8 for libvir-list@redhat.com; Mon, 11 Jan 2021 12:56:32 +0300 X-MC-Unique: 1sHZTNLDOQmdFG9ohRFe_g-1 X-MC-Unique: _2WSC-VSPNiQ3cgSE6xenQ-1 From: Nikolay Shirokovskiy To: libvir-list@redhat.com Subject: [PATCH 06/23] qemu: reuse virDomainBlockIoTuneValidate Date: Mon, 11 Jan 2021 12:49:59 +0300 Message-Id: <1610358616-567804-7-git-send-email-nshirokovskiy@virtuozzo.com> In-Reply-To: <1610358616-567804-1-git-send-email-nshirokovskiy@virtuozzo.com> References: <1610358616-567804-1-git-send-email-nshirokovskiy@virtuozzo.com> X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 2 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Nikolay Shirokovskiy Reviewed-by: Peter Krempa --- src/qemu/qemu_driver.c | 31 +------------------------------ 1 file changed, 1 insertion(+), 30 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 984b45d..117c7b7 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16170,37 +16170,8 @@ qemuDomainSetBlockIoTune(virDomainPtr dom, =20 #undef SET_IOTUNE_FIELD =20 - if ((info.total_bytes_sec && info.read_bytes_sec) || - (info.total_bytes_sec && info.write_bytes_sec)) { - virReportError(VIR_ERR_INVALID_ARG, "%s", - _("total and read/write of bytes_sec " - "cannot be set at the same time")); - goto endjob; - } - - if ((info.total_iops_sec && info.read_iops_sec) || - (info.total_iops_sec && info.write_iops_sec)) { - virReportError(VIR_ERR_INVALID_ARG, "%s", - _("total and read/write of iops_sec " - "cannot be set at the same time")); - goto endjob; - } - - if ((info.total_bytes_sec_max && info.read_bytes_sec_max) || - (info.total_bytes_sec_max && info.write_bytes_sec_max)) { - virReportError(VIR_ERR_INVALID_ARG, "%s", - _("total and read/write of bytes_sec_max " - "cannot be set at the same time")); + if (virDomainBlockIoTuneValidate(&info) < 0) goto endjob; - } - - if ((info.total_iops_sec_max && info.read_iops_sec_max) || - (info.total_iops_sec_max && info.write_iops_sec_max)) { - virReportError(VIR_ERR_INVALID_ARG, "%s", - _("total and read/write of iops_sec_max " - "cannot be set at the same time")); - goto endjob; - } =20 virDomainBlockIoTuneInfoCopy(&info, &conf_info); =20 --=20 1.8.3.1