From nobody Sun Sep 7 23:35:48 2025 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; 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=1756221541; cv=none; d=zohomail.com; s=zohoarc; b=PPF7FTvfSoFHN8DaINXW1AmOc+BclK0I32R7vvl9W0rWnJrinqXW6pzcrw7VjvMSM9ltllB40SlOIE4d65xQFsJgDn/rUY5190RSnbDk6FXrLwjpuPUWz82vXPN28DE1wZp3PVJ0JmdwAJ/U8BuKNynXbqgpw92lWoj7IfG9tFg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756221541; 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=RUVxeVZ2Id/6E4ZRYnKA4gki9OOxS4hca+NfHbd3Ihw=; b=H47xBc7f2JWh78do+E7M4hH0SZGYOZXgR0XEt6Yh5+e/ET1KPUrl7Wpj8l4knpKUjtMWMIjj1Gi3fa942t6m+VT5lonpWqt8YVzSqDPATqqlZk4ID0bPBGYtwF19BFxaGcxyvM0Fj2Qci4gU/9u8uPzTeMB7p9qo0MyCvkE9hEg= 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 1756221541338540.7936899401548; Tue, 26 Aug 2025 08:19:01 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 7268A43F56; Tue, 26 Aug 2025 11:19:00 -0400 (EDT) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 0903A43F38; Tue, 26 Aug 2025 11:17:08 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 1B73443F0F; Tue, 26 Aug 2025 11:16:46 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 AB15243F0C for ; Tue, 26 Aug 2025 11:16:41 -0400 (EDT) Received: from mx-prod-mc-02.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-149-iz5_zBfhM_iNH98g607YBg-1; Tue, 26 Aug 2025 11:16:39 -0400 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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F343F195608D for ; Tue, 26 Aug 2025 15:16:38 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.44.22.3]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3F68519560AB for ; Tue, 26 Aug 2025 15:16:37 +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=-1.5 required=5.0 tests=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=1756221401; 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=RUVxeVZ2Id/6E4ZRYnKA4gki9OOxS4hca+NfHbd3Ihw=; b=YhmfSD98Icd+eMIjNHPfJN1fwIIiHKZ6t6zeJR5kCmtC/I4UlhtjWJWSgQe0YXabntf7+x kLFey2ER0Q5Ng0m2sGrYGO7AEMDMMB7nELBJa2sF6gtRvSirBW0Z9GCn9BbnQyKiBfKcnt 6N0p0i444ZhJWxa7ylf0Xi8A7bqaFCk= X-MC-Unique: iz5_zBfhM_iNH98g607YBg-1 X-Mimecast-MFC-AGG-ID: iz5_zBfhM_iNH98g607YBg_1756221399 To: devel@lists.libvirt.org Subject: [PATCH 1/3] qemu: hotplug: Audit device detach before deleting it Date: Tue, 26 Aug 2025 17:16:33 +0200 Message-ID: <5330c94ea9b43bcffb53275f60fc31d3745d1f16.1756221301.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: JhcUUfyTyggVZZk8c4oMw4-XAO2earXvadW5VsKxSJk_1756221399 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: MF26I6IYIPYMN3Q3L4NHTGCYJGODPPZU X-Message-ID-Hash: MF26I6IYIPYMN3Q3L4NHTGCYJGODPPZU 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: 1756221543176116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Commit f30843142aa0836423f5e3ff7a45707eb13ce553 introduced a code path for solving a race when qemu doesn't know about a device but libvirt still does. The patch introduced a call to 'qemuDomainRemoveDevice' (which deletes/frees the device definition) and placed it before the call to 'qemuDomainRemoveAuditDevice' (which accesses the device definition to do the audit log reporting). Reorder them to prevent the qemu driver crashing in the corner case where qemu already detached the device but libvirt didn't yet process it, which can be triggered by calling the asynchronous 'virDomainDetachDeviceAlias' API. In addition in case when we're about to delete the device and return success we need to also report successful detach in the audit log so the logic calling the auditing function needs to be fixed as well. Resolves: https://issues.redhat.com/browse/RHEL-110191 Fixes: f30843142aa0836423f5e3ff7a45707eb13ce553 Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko Reviewed-by: Martin Kletzander --- src/qemu/qemu_hotplug.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index e9568af125..afc75072ae 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -6620,10 +6620,13 @@ qemuDomainDetachDeviceLive(virDomainObj *vm, rc =3D qemuDomainDeleteDevice(vm, info->alias); if (rc < 0) { + /* we want to report succesful detach if device doesn't exist any = more in qemu */ + if (virDomainObjIsActive(vm)) + qemuDomainRemoveAuditDevice(vm, &detach, rc =3D=3D -2); + if (rc =3D=3D -2) ret =3D qemuDomainRemoveDevice(driver, vm, &detach); - if (virDomainObjIsActive(vm)) - qemuDomainRemoveAuditDevice(vm, &detach, false); + goto cleanup; } --=20 2.51.0 From nobody Sun Sep 7 23:35:48 2025 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; 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=1756221598; cv=none; d=zohomail.com; s=zohoarc; b=bx/QD1/RSx2qVK/QTV9qwenkvdV2iOQxNxtNQp9Vu42AposAvnTzcz3Xb0juti5hG25nnts+KMJawctiatxA6zAM+t2hLYDgx/r6qj67iWvr4OjYPZduaflZulRDnRTN8rO48rtvP/VqBOGQdHpPxwKsYbGp6KZ4q0dTct8Ugpk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756221598; 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=1koDhCSwQVCMQsmXfSRVRNhr+14sji9fxdI9KAUOgxk=; b=fKbEATbKx4+e1DoimWhcyrRoXUV7ftTZ112JrLxG9yqkjutk6N7z3CbGonKFxCn0LT4kcgTn5kYjdVsd7xsazrLUgApJxrYJq8ndoCWjj0cegpdMXAUTEWrW0Yq1kiAJt4Ka2ZXC+qZBCHVJbwhLl5j7GtmhD0a4695Hk2j0xCc= 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 1756221598518820.973889710032; Tue, 26 Aug 2025 08:19:58 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id DEA8443F3E; Tue, 26 Aug 2025 11:19:57 -0400 (EDT) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 0C4D343F5E; Tue, 26 Aug 2025 11:17:23 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 364B643F0C; Tue, 26 Aug 2025 11:16:49 -0400 (EDT) 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 7141B43F14 for ; Tue, 26 Aug 2025 11:16:43 -0400 (EDT) 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-540-iH2JS5FLOOywOuN7Zy6BUw-1; Tue, 26 Aug 2025 11:16:41 -0400 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 3AD47195608A for ; Tue, 26 Aug 2025 15:16:40 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.44.22.3]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 73D5819560AB for ; Tue, 26 Aug 2025 15:16:39 +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=-1.5 required=5.0 tests=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=1756221403; 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=1koDhCSwQVCMQsmXfSRVRNhr+14sji9fxdI9KAUOgxk=; b=fO3l6eVNs+X4NvRE4UHZGsZXceCRrz0Ln1Zrd9mlM6gRFFFDhKx7A83YaTWv7ZFIU/ZXmz aka0c0VQavzQlL0nAKgYJF5pBJWkOui3zuDlvUmtX8oQyaueBfLC2smijRdjL9nAivEurJ jphxxbn9ihKHgGSBwTy9hT7S9gxSRyQ= X-MC-Unique: iH2JS5FLOOywOuN7Zy6BUw-1 X-Mimecast-MFC-AGG-ID: iH2JS5FLOOywOuN7Zy6BUw_1756221400 To: devel@lists.libvirt.org Subject: [PATCH 2/3] daemon: Drop log level of VIR_ERR_NO_SUPPORT to debug Date: Tue, 26 Aug 2025 17:16:34 +0200 Message-ID: <078e0f09b66ebeefe18293c862445296e595d83b.1756221301.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: N3k1jysMSx1PwE1a6ll5Xg2M_E8BJc9IvAx4EgzEZ-U_1756221400 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ED26UKSXSLAG3YSZE72XRE4RSQP7SMTR X-Message-ID-Hash: ED26UKSXSLAG3YSZE72XRE4RSQP7SMTR 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: 1756221600626124100 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The error code signals that the API the user called is not supported by the driver. This can happen with some hypervisor drivers which don't have everything implemented yet. There's no point in spamming the log with it. Closes: https://gitlab.com/libvirt/libvirt/-/issues/805 Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko Reviewed-by: Martin Kletzander --- src/remote/remote_daemon.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/remote/remote_daemon.c b/src/remote/remote_daemon.c index 1424d4cf5e..2973813548 100644 --- a/src/remote/remote_daemon.c +++ b/src/remote/remote_daemon.c @@ -108,6 +108,7 @@ static int daemonErrorLogFilter(virErrorPtr err, int pr= iority) case VIR_ERR_NO_CLIENT: case VIR_ERR_NO_HOSTNAME: case VIR_ERR_NO_NETWORK_METADATA: + case VIR_ERR_NO_SUPPORT: return VIR_LOG_DEBUG; } --=20 2.51.0 From nobody Sun Sep 7 23:35:48 2025 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; 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=1756221669; cv=none; d=zohomail.com; s=zohoarc; b=BSl/wfK1VDcVAxbkG+BAcK3g8hPVGPRqa4kfBU65BbmpEHdtzJDIQ0PqXcgdR+H/XX5z1eDuYEb3QlxJcT225Xq5LB4skEgOWCSu4z/oLaNeH05t5MyilPXLNDmHowM/MF+3c6mTJqa6Dqjf0xCwy6A7TDTYXewDIXndgYBlKWE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1756221669; 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=Y6y5dmlt9N5oJyGC24kni5BqWiw8RbS7coayvDl0gRM=; b=Frbw6LU+8i4UuHEszSfJ5TvXRxA6r5twVELoPt4BhIAGpxmFMXSYapWoky0ss5IXWaGMJyMLO7jeB5ez1/CK36rLTjD+Q35m/hwPsazd1UeEdVHJ59MKkEMP+HvRhNAXi37GnWPjZx3nx0tNBXmgH6/oz/Q7o6xGB39twnLSyyA= 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 175622166956799.13715854886857; Tue, 26 Aug 2025 08:21:09 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 84C1B43F14; Tue, 26 Aug 2025 11:21:08 -0400 (EDT) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 015B644073; Tue, 26 Aug 2025 11:17:37 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id CD5DB43F2C; Tue, 26 Aug 2025 11:16:49 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.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 9413E43F0A for ; Tue, 26 Aug 2025 11:16:44 -0400 (EDT) Received: from mx-prod-mc-01.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-639--rnSmBVHPQqRS6-JPSY8aQ-1; Tue, 26 Aug 2025 11:16:42 -0400 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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6E0DC19560A1 for ; Tue, 26 Aug 2025 15:16:41 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.44.22.3]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B2DD619560AB for ; Tue, 26 Aug 2025 15:16:40 +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=-1.5 required=5.0 tests=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=1756221404; 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=Y6y5dmlt9N5oJyGC24kni5BqWiw8RbS7coayvDl0gRM=; b=aASp3IltQyJ9k+y1Y/KIa/+SVjqVjv8IUrdewVUbORiZhMqHvCAuCH4WjItdraA0A7xATl QpFEPxnAnvSj00+J7U8M0CllBMlee9nu6MT9GHDBRshpQkudRPTihNuyOpK6ctlf53k6yC SSMj+jpXoLEi2kuS2TRsK+WkputSeDQ= X-MC-Unique: -rnSmBVHPQqRS6-JPSY8aQ-1 X-Mimecast-MFC-AGG-ID: -rnSmBVHPQqRS6-JPSY8aQ_1756221401 To: devel@lists.libvirt.org Subject: [PATCH 3/3] qemu: monitor: Remove wrappers for 'block-dirty-bitmap-enable'/'block-dirty-bitmap-disable' Date: Tue, 26 Aug 2025 17:16:35 +0200 Message-ID: <9f5161de56e90dc6b436c0f8dff27d4eb4169c56.1756221301.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: 97L587-cmuCoUf0esSc5MITfOwJAN8TbTCsqLULiSD0_1756221401 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: WKUUMTOKEMVRKL5SEAYYQVSEQTRZ66UB X-Message-ID-Hash: WKUUMTOKEMVRKL5SEAYYQVSEQTRZ66UB 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: 1756221670452116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Libvirt doesn't use them. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko Reviewed-by: Martin Kletzander --- src/qemu/qemu_monitor.c | 18 ------------------ src/qemu/qemu_monitor.h | 8 -------- src/qemu/qemu_monitor_json.c | 26 -------------------------- tests/qemumonitorjsontest.c | 2 -- 4 files changed, 54 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index c1fef8d5de..e1ff8c15ce 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4275,24 +4275,6 @@ qemuMonitorBitmapRemove(qemuMonitor *mon, } -int -qemuMonitorTransactionBitmapEnable(virJSONValue *actions, - const char *node, - const char *name) -{ - return qemuMonitorJSONTransactionBitmapEnable(actions, node, name); -} - - -int -qemuMonitorTransactionBitmapDisable(virJSONValue *actions, - const char *node, - const char *name) -{ - return qemuMonitorJSONTransactionBitmapDisable(actions, node, name); -} - - int qemuMonitorTransactionBitmapMerge(virJSONValue *actions, const char *node, diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 755f347e17..93fa38da71 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -1464,14 +1464,6 @@ qemuMonitorBitmapRemove(qemuMonitor *mon, const char *node, const char *name); int -qemuMonitorTransactionBitmapEnable(virJSONValue *actions, - const char *node, - const char *name); -int -qemuMonitorTransactionBitmapDisable(virJSONValue *actions, - const char *node, - const char *name); -int qemuMonitorTransactionBitmapMerge(virJSONValue *actions, const char *node, const char *target, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 9f51421478..029ecae81a 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -8245,32 +8245,6 @@ qemuMonitorJSONBitmapRemove(qemuMonitor *mon, } -int -qemuMonitorJSONTransactionBitmapEnable(virJSONValue *actions, - const char *node, - const char *name) -{ - return qemuMonitorJSONTransactionAdd(actions, - "block-dirty-bitmap-enable", - "s:node", node, - "s:name", name, - NULL); -} - - -int -qemuMonitorJSONTransactionBitmapDisable(virJSONValue *actions, - const char *node, - const char *name) -{ - return qemuMonitorJSONTransactionAdd(actions, - "block-dirty-bitmap-disable", - "s:node", node, - "s:name", name, - NULL); -} - - int qemuMonitorJSONTransactionBitmapMerge(virJSONValue *actions, const char *node, diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index a18872db60..f9dc4081f7 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -2654,8 +2654,6 @@ testQemuMonitorJSONTransaction(const void *opaque) if (qemuMonitorTransactionBitmapAdd(actions, "node1", "bitmap1", true,= true, 1234) < 0 || qemuMonitorTransactionBitmapRemove(actions, "node2", "bitmap2") < = 0 || - qemuMonitorTransactionBitmapEnable(actions, "node3", "bitmap3") < = 0 || - qemuMonitorTransactionBitmapDisable(actions, "node4", "bitmap4") <= 0 || qemuMonitorTransactionBitmapMerge(actions, "node5", "bitmap5", &me= rgebitmaps) < 0 || qemuMonitorTransactionSnapshotBlockdev(actions, "node7", "overlay7= ") < 0 || qemuMonitorTransactionBackup(actions, "dev8", "job8", "target8", "= bitmap8", --=20 2.51.0