From nobody Mon Feb 2 07:31:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1768814329; cv=none; d=zohomail.com; s=zohoarc; b=SiE+zd/bH0+kBsXgz8hSagfOoByTDIiU/ZzytQTO0rV+LbgeEawuxhM/OIR2rkGWLE/oAzRJxBqoMMbpPouLvE7lp24nIewyXGtvfIv8IBEtphH0sYewxHlboIJ+PKfy1eBvkJrD+JyKvUjLEdRwHjkgQB9f/laXbdSOH3kMX9U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1768814329; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=bh8HcdMeZcrWiySO23x9dqvX8llmt2vK/oM6CtZiSTY=; b=MUT7uYcVHEQx+QzCjGvPhReQD9Mzx62musjCr4Nl4zBtiv+4wvyi4DUTBgcRK4pa3gbjUzwmTv1yG25BcEvsZ7N4tBkD8Vk93RTJKVdZWqIMwlNzG1jh+wmX5q0gkNcFiDXVUudAddUW6cLuODnsExkq4zVw/OD3bwPaF/NvA2o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1768814329086651.4187082848979; Mon, 19 Jan 2026 01:18:49 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 379EE41980; Mon, 19 Jan 2026 04:18:48 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 89C6D43F89; Mon, 19 Jan 2026 04:13:06 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id A1AAF43DDF; Mon, 19 Jan 2026 04:13:01 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 326BE419C4 for ; Mon, 19 Jan 2026 04:12:53 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-288--sJPWGExMtOuFRrPNhN5NQ-1; Mon, 19 Jan 2026 04:12:51 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 75DAA195609D for ; Mon, 19 Jan 2026 09:12:50 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.5]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A7BCE19560A7 for ; Mon, 19 Jan 2026 09:12:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1768813972; h=from:from: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; bh=bh8HcdMeZcrWiySO23x9dqvX8llmt2vK/oM6CtZiSTY=; b=aGg96ENU0BxQf8PNKpWhmwvYbLc5w7A+wliouMBIJ5B7GXGrWwKv8BLokGaj7phAjH5NTn nBTloDS2SW8r+NetscdlcbJayToCtDdFtgoZtGJDUFAePNbuhMpMVTJPQunv850EpUJV2f szpNKLoZp6t8zFynfCxUQWm8NmrgAqc= X-MC-Unique: -sJPWGExMtOuFRrPNhN5NQ-1 X-Mimecast-MFC-AGG-ID: -sJPWGExMtOuFRrPNhN5NQ_1768813970 To: devel@lists.libvirt.org Subject: [PATCH 3/4] qemuDomainSetThrottleGroup: Always honour thottle group name passed as argument Date: Mon, 19 Jan 2026 10:12:43 +0100 Message-ID: <22ce4337465d98880cf4819bd761f51ba128f562.1768813932.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: _kaxRM0TaAPPR0IID516CIhCu5nm4OPBC-ozF0JwFSY_1768813970 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: T56JEZNV3T52KUU4FF6EFFJ6KMD6WB2S X-Message-ID-Hash: T56JEZNV3T52KUU4FF6EFFJ6KMD6WB2S X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1768814330042158500 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Due to the code share with 'qemuDomainSetBlockIoTune' the throttle group setting code accepts the throttle group name also via typed parameters. In 'qemuDomainSetThrottleGroup', this means that there are 2 ways to pass it the throttle group name and both are handled slightly differently. Specifically the name of the group used in the list of groups is the name taken from the typed parameters rather than the one passed via API. We also don't validate that they match. Now if the name in the typed parameters is missing we'd add empty string to the group list which would later crash when looking up the group name. To avoid this problem always use the name passed via argument. This is achieved by passing it into 'qemuDomainSetBlockIoTuneFields' so that it overrides whatever is in the typed parameters. Signed-off-by: Peter Krempa --- src/qemu/qemu_driver.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 8c7a2e9fe2..9addad3b9e 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -15177,6 +15177,7 @@ static int qemuDomainSetBlockIoTuneFields(virDomainBlockIoTuneInfo *info, virTypedParameterPtr params, int nparams, + const char *group_name, qemuBlockIoTuneSetFlags *set_fields, virTypedParameterPtr *eventParams, int *eventNparams, @@ -15247,6 +15248,10 @@ qemuDomainSetBlockIoTuneFields(virDomainBlockIoTun= eInfo *info, WRITE_IOPS_SEC_MAX_LENGTH); } + /* The name of the throttle group passed via API always takes preceden= ce */ + if (group_name) + param_group_name =3D group_name; + if (param_group_name) { info->group_name =3D g_strdup(param_group_name); *set_fields |=3D QEMU_BLOCK_IOTUNE_SET_GROUP_NAME; @@ -15394,6 +15399,7 @@ qemuDomainSetBlockIoTune(virDomainPtr dom, if (qemuDomainSetBlockIoTuneFields(&info, params, nparams, + NULL, &set_fields, &eventParams, &eventNparams, @@ -20388,6 +20394,7 @@ qemuDomainSetThrottleGroup(virDomainPtr dom, if (qemuDomainSetBlockIoTuneFields(&info, params, nparams, + groupname, &set_fields, &eventParams, &eventNparams, --=20 2.52.0