From nobody Tue Feb 10 16:18:47 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=virtuozzo.com ARC-Seal: i=1; a=rsa-sha256; t=1578466262; cv=none; d=zohomail.com; s=zohoarc; b=J52FrVpng0jyTSo7AR/MlPTmU7XQQreJNjld9mX4+eaRUpeu4xobNUSDBcvwyR39n4Vo7hnxISQ+FFfLAoWlHY6LMoReJhlIr4PtPIdrEIwlJfkbIEkRxtS9SDF693RKi1d3Gdoyz3p2IqeqA04kKo2vJSNyktwi0gNAwT1tlqE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578466262; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=iNJR+Pjd/yZQGtt7yLARYcsp/oPfv15ajKywKql6kcI=; b=Gt3OMr+C0k6JxuRUe1tj3UDFq2acwD6e+gGTTQ2PES1Mk/nJxRmafoVE859+mAwOcgTQdSJqi2vzbDO/Vp0hUnpc5Z3q+NWA1YBCkiHnuc5H2Y0XWVSbeH/s4SUYYt/Q1+ryrBPmHWFHKzv3IvXH/PszFxyhJ8ZHCYJlXkBgbAo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1578466262677142.59407118305012; Tue, 7 Jan 2020 22:51:02 -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-425-Cuo2H-CzOkm0rTQy6gjk0Q-1; Wed, 08 Jan 2020 01:50:58 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id D4B5691205; Wed, 8 Jan 2020 06:50:52 +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 ACECE60CC0; Wed, 8 Jan 2020 06:50:52 +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 6C9A11808855; Wed, 8 Jan 2020 06:50:52 +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 0086oGD1001459 for ; Wed, 8 Jan 2020 01:50:17 -0500 Received: by smtp.corp.redhat.com (Postfix) id CC50A2166B29; Wed, 8 Jan 2020 06:50:16 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C6F322166B27 for ; Wed, 8 Jan 2020 06:50:12 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (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 C66D38F6171 for ; Wed, 8 Jan 2020 06:50:12 +0000 (UTC) Received: from relay.sw.ru (relay.sw.ru [185.231.240.75]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-388-bno7-YyPNjy2OSU-2flntA-1; Wed, 08 Jan 2020 01:50:11 -0500 Received: from dhcp-172-16-24-106.sw.ru ([172.16.24.106] helo=shiny.sw.ru) by relay.sw.ru with esmtp (Exim 4.92.3) (envelope-from ) id 1ip5AM-0004p8-Gy for libvir-list@redhat.com; Wed, 08 Jan 2020 09:50:06 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578466261; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=iNJR+Pjd/yZQGtt7yLARYcsp/oPfv15ajKywKql6kcI=; b=gI8wDfoO/7cZlY2+9fmsOztuE9QpxZC+c+jI/4PgIWmYAfOJ9AqLJJRFqcBl0qJc9LD/aB f0fDOGL6QdMxCZ9HQ8LCk87dP3k2Nvv7gzZGoyrHEvNUGYnBLyA6Drzb/QISOpWI0oyem8 3H51Z6stIRASFi2PZb+tvmd+GdvEC50= From: Nikolay Shirokovskiy To: libvir-list@redhat.com Date: Wed, 8 Jan 2020 09:49:29 +0300 Message-Id: <20200108064931.2385-6-nshirokovskiy@virtuozzo.com> In-Reply-To: <20200108064931.2385-1-nshirokovskiy@virtuozzo.com> References: <20200108064931.2385-1-nshirokovskiy@virtuozzo.com> MIME-Version: 1.0 X-MC-Unique: bno7-YyPNjy2OSU-2flntA-1 X-MC-Unique: Cuo2H-CzOkm0rTQy6gjk0Q-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 0086oGD1001459 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/7] qemu: propagate iotune settings to all disks in the group 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.12 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Currently upon successfull call to qemu's implementation of virDomainSetBlockIoTune iotune settings are changed only for the disk given in API if the disk is in iotune group while we need to change the settings for all disks in the group. Signed-off-by: Nikolay Shirokovskiy Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_driver.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f1ee25aebd..5713266329 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -19102,6 +19102,29 @@ qemuDomainSetBlockIoTuneDefaults(virDomainBlockIoT= uneInfoPtr newinfo, } =20 =20 +static void +qemuDomainSetGroupBlockIoTune(virDomainDefPtr def, + virDomainBlockIoTuneInfoPtr iotune) +{ + size_t i; + + if (!iotune->group_name) + return; + + for (i =3D 0; i < def->ndisks; i++) { + virDomainDiskDefPtr d =3D def->disks[i]; + + if (STREQ_NULLABLE(d->blkdeviotune.group_name, iotune->group_name)= ) { + char *tmp; + + tmp =3D d->blkdeviotune.group_name; + d->blkdeviotune =3D *iotune; + d->blkdeviotune.group_name =3D tmp; + } + } +} + + static int qemuDomainSetBlockIoTune(virDomainPtr dom, const char *path, @@ -19409,6 +19432,8 @@ qemuDomainSetBlockIoTune(virDomainPtr dom, if (virDomainDiskSetBlockIOTune(disk, &info) < 0) goto endjob; =20 + qemuDomainSetGroupBlockIoTune(def, &info); + if (virDomainObjSave(vm, driver->xmlopt, cfg->stateDir) < 0) goto endjob; =20 @@ -19434,6 +19459,8 @@ qemuDomainSetBlockIoTune(virDomainPtr dom, if (virDomainDiskSetBlockIOTune(conf_disk, &conf_info) < 0) goto endjob; =20 + qemuDomainSetGroupBlockIoTune(persistentDef, &conf_info); + if (virDomainDefSave(persistentDef, driver->xmlopt, cfg->configDir) < 0) goto endjob; --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list