From nobody Tue Oct 28 08:17:43 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=1760023116; cv=none; d=zohomail.com; s=zohoarc; b=kgNi2xxQm8/HURy314oSb7k0KiFBBpjQikjq7LtYgkaO/lDqF9mYpjUTxsGLt90O/0tzBMhvMfRcwlXHMGbB6qJ1ThxpZe/+LV9YzBA9QfCGJk+SjJeQEDfU56m892UsDTxejJg5EIhdZnGuW51NG/kHmLyw6ucRHD7QGQObLSI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760023116; 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=XhUvPxLguKS+XOGsEhonKhKan+E0H7rOSkBK6+XJwGU=; b=EPqDu8srvnF1XTBcISATI1Ydxkh3JxiJpdEZijQNcRUz1mcRtQl04tM12vTcfoE6ijnFNnmU9oLcCO81yQKmzzFcWx6JFjZNrySC/oY+OejV5uC+KorbxudDcpvyvxISK5MMiFOcS3WB5gdofrbDjO8Aml9/32arWvXzhErOAWQ= 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 1760023116060777.1431183511747; Thu, 9 Oct 2025 08:18:36 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 5F2BB442BE; Thu, 9 Oct 2025 11:18:30 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id E496F442DA; Thu, 9 Oct 2025 11:16:44 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 733EC43E6E; Thu, 9 Oct 2025 11:16:23 -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 AD2D843E48 for ; Thu, 9 Oct 2025 11:16:22 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-684-GEnJzeWKPUufJQq5eeGl1w-1; Thu, 09 Oct 2025 11:16:21 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2FD97180057B for ; Thu, 9 Oct 2025 15:16:20 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 62E601955F22 for ; Thu, 9 Oct 2025 15:16:19 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022982; 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=XhUvPxLguKS+XOGsEhonKhKan+E0H7rOSkBK6+XJwGU=; b=OV+CBo5LN8sNAlUQjIFK+PTTM0di9nZM/wPvda5re8yA8j+he5u6Cs6NN+t4nMawvR+jWa byZvHBl1a8QE6GJzhGzXU9RkDvZZpTA081ehbKSiA6OQzd2J9YOJdURkg4HfPRTeoQvUJp GYwnp5+10ipzMH79iHXN9Ev50F3Y1Nk= X-MC-Unique: GEnJzeWKPUufJQq5eeGl1w-1 X-Mimecast-MFC-AGG-ID: GEnJzeWKPUufJQq5eeGl1w_1760022980 To: devel@lists.libvirt.org Subject: [RFC PATCH 01/16] qemu: monitor: Remove qemuMonitorQueryBlockstats Date: Thu, 9 Oct 2025 17:16:01 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: oShpu3peLeQfSMVRF6rhfkohS1uEkMSlfRfTwGb2Xtc_1760022980 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: MNEST37WCJBD4ZM2SPFRTBA2JC2AEBTW X-Message-ID-Hash: MNEST37WCJBD4ZM2SPFRTBA2JC2AEBTW 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: 1760023118104116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Unused since v8.6.0-154-g75a0fbe420 Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 15 --------------- src/qemu/qemu_monitor.h | 2 -- src/qemu/qemu_monitor_json.c | 2 +- src/qemu/qemu_monitor_json.h | 3 --- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 2fc883e8a6..7b09792c5d 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1967,21 +1967,6 @@ qemuMonitorGetBlockInfo(qemuMonitor *mon) } -/** - * qemuMonitorQueryBlockstats: - * @mon: monitor object - * - * Returns data from a call to 'query-blockstats' without using 'query-nod= es' - */ -virJSONValue * -qemuMonitorQueryBlockstats(qemuMonitor *mon) -{ - QEMU_CHECK_MONITOR_NULL(mon); - - return qemuMonitorJSONQueryBlockstats(mon, false); -} - - /** * qemuMonitorGetAllBlockStatsInfo: * @mon: monitor object diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 8ef85ceb0a..6427fd42cd 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -677,8 +677,6 @@ int qemuMonitorSetMemoryStatsPeriod(qemuMonitor *mon, int qemuMonitorBlockIOStatusToError(const char *status); GHashTable *qemuMonitorGetBlockInfo(qemuMonitor *mon); -virJSONValue *qemuMonitorQueryBlockstats(qemuMonitor *mon); - typedef struct _qemuBlockStats qemuBlockStats; struct _qemuBlockStats { unsigned long long rd_req; diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 9caade7bc9..b459a2f036 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2463,7 +2463,7 @@ qemuMonitorJSONGetOneBlockStatsNodeInfo(virJSONValue = *dev, } -virJSONValue * +static virJSONValue * qemuMonitorJSONQueryBlockstats(qemuMonitor *mon, bool queryNodes) { diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index f17769f7fe..5944aec917 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -91,9 +91,6 @@ int qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, GHashTable *table); -virJSONValue * -qemuMonitorJSONQueryBlockstats(qemuMonitor *mon, - bool queryNodes); int qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable *hash); --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760023236; cv=none; d=zohomail.com; s=zohoarc; b=UPDfyj8pNTtUMR/rx0hPoxrOLDIh//ESod5pv8TRWPm69e14lGq8jxurIbSil6YM05DpGHZqA7LEqMjT+UmLZWN3/DyTLkxfXgK1jCxmVpsnUbqVZOHZEzdD5GaSF6ObsB72paB/AFDNPe6sbKbxQloYmdae5uFQ9aaloY4CyXc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760023236; 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=/Jq38UlbPgnxDOMX7OCgoXI/Ed4e11FIhCIw+4bNm2o=; b=nN0gEDqa2X0zE2w2mYHOI5azxiPQwSJRyxbm1Gp5/eo8VDNi8CTyy0i8kcdIJ52BDYJO5VLG9cBO6QyBn5fPcRdXl/PZ/5DU2YCjjrYIFN3h3aGtCbBvlJSvANMzFKDVxabpxp/OuK6zLE1xrh027BWSYgoTL4FmR5MlMlRNVbA= 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 176002323674932.87546510889774; Thu, 9 Oct 2025 08:20:36 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id C10EC44021; Thu, 9 Oct 2025 11:20:33 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 10C7544381; Thu, 9 Oct 2025 11:16:54 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id E2C2443E48; Thu, 9 Oct 2025 11:16:27 -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 26E3D43E48 for ; Thu, 9 Oct 2025 11:16:26 -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-360-gfcuptvoMEmCxDii9DM3dg-1; Thu, 09 Oct 2025 11:16:22 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 B04961956096 for ; Thu, 9 Oct 2025 15:16:21 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A514A1955F22 for ; Thu, 9 Oct 2025 15:16:20 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022985; 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=/Jq38UlbPgnxDOMX7OCgoXI/Ed4e11FIhCIw+4bNm2o=; b=eM2rbkfw0ZXnxefpTHZ0li+oWjNPEmhL6C46Mso2S8z4yqn1WymfKbsnjNge8tnkWcHeY2 0BykwboPH7j+YfMAA4r8R9XTjdzJYm978zOiJqdwHLWLYanOu3n3UlwukoLkOflls7Be/y cUgyaCi2aPAX5OuIKPIjHGg21pdF0pw= X-MC-Unique: gfcuptvoMEmCxDii9DM3dg-1 X-Mimecast-MFC-AGG-ID: gfcuptvoMEmCxDii9DM3dg_1760022981 To: devel@lists.libvirt.org Subject: [RFC PATCH 02/16] qemu_monitor_json.c: Use consistent function hader coding style Date: Thu, 9 Oct 2025 17:16:02 +0200 Message-ID: <4316d0246768784c1debbea5a1ccb5cbaeaa0250.1760022633.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 6lkvO6L1er7qX4e7e1X3M6nldTFizYILsbkXZNaAEKE_1760022981 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 7OCV3TUJPHS3G5TDRYABP65TTI6IJTUM X-Message-ID-Hash: 7OCV3TUJPHS3G5TDRYABP65TTI6IJTUM 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: 1760023239167116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Convert the rest of the code to the new prevailing coding style. Commit 6e6a11bc0ac did the same for the header file. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_monitor_json.c | 373 +++++++++++++++++++++++------------ 1 file changed, 246 insertions(+), 127 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index b459a2f036..2dbaa7a798 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -133,6 +133,7 @@ static qemuEventHandler eventHandlers[] =3D { /* We use bsearch, so keep this list sorted. */ }; + static int qemuMonitorEventCompare(const void *key, const void *elt) { @@ -141,6 +142,7 @@ qemuMonitorEventCompare(const void *key, const void *el= t) return strcmp(type, handler->type); } + static int qemuMonitorJSONIOProcessEvent(qemuMonitor *mon, virJSONValue *obj) @@ -183,6 +185,7 @@ qemuMonitorJSONIOProcessEvent(qemuMonitor *mon, return 0; } + int qemuMonitorJSONIOProcessLine(qemuMonitor *mon, const char *line, @@ -227,10 +230,12 @@ qemuMonitorJSONIOProcessLine(qemuMonitor *mon, return -1; } -int qemuMonitorJSONIOProcess(qemuMonitor *mon, - const char *data, - size_t len, - qemuMonitorMessage *msg) + +int +qemuMonitorJSONIOProcess(qemuMonitor *mon, + const char *data, + size_t len, + qemuMonitorMessage *msg) { int used =3D 0; /*VIR_DEBUG("Data %d bytes [%s]", len, data);*/ @@ -254,6 +259,7 @@ int qemuMonitorJSONIOProcess(qemuMonitor *mon, return used; } + static int qemuMonitorJSONCommandWithFd(qemuMonitor *mon, virJSONValue *cmd, @@ -308,6 +314,7 @@ qemuMonitorJSONCommand(qemuMonitor *mon, return qemuMonitorJSONCommandWithFd(mon, cmd, -1, reply); } + /* Ignoring OOM in this method, since we're already reporting * a more important error * @@ -332,6 +339,7 @@ qemuMonitorJSONStringifyError(virJSONValue *error) return detail; } + static const char * qemuMonitorJSONCommandName(virJSONValue *cmd) { @@ -342,6 +350,7 @@ qemuMonitorJSONCommandName(virJSONValue *cmd) return ""; } + static int qemuMonitorJSONCheckErrorFull(virJSONValue *cmd, virJSONValue *reply, @@ -545,7 +554,9 @@ qemuMonitorJSONMakeCommand(const char *cmdname, } -static void qemuMonitorJSONHandleShutdown(qemuMonitor *mon, virJSONValue *= data) +static void +qemuMonitorJSONHandleShutdown(qemuMonitor *mon, + virJSONValue *data) { bool guest =3D false; const char *reason =3D NULL; @@ -560,17 +571,24 @@ static void qemuMonitorJSONHandleShutdown(qemuMonitor= *mon, virJSONValue *data) qemuMonitorEmitShutdown(mon, guest_initiated, reason); } -static void qemuMonitorJSONHandleReset(qemuMonitor *mon, virJSONValue *dat= a G_GNUC_UNUSED) + +static void qemuMonitorJSONHandleReset(qemuMonitor *mon, + virJSONValue *data G_GNUC_UNUSED) { qemuMonitorEmitReset(mon); } -static void qemuMonitorJSONHandleStop(qemuMonitor *mon, virJSONValue *data= G_GNUC_UNUSED) + +static void +qemuMonitorJSONHandleStop(qemuMonitor *mon, + virJSONValue *data G_GNUC_UNUSED) { qemuMonitorEmitStop(mon); } -static void qemuMonitorJSONHandleResume(qemuMonitor *mon, virJSONValue *da= ta G_GNUC_UNUSED) +static void +qemuMonitorJSONHandleResume(qemuMonitor *mon, + virJSONValue *data G_GNUC_UNUSED) { qemuMonitorEmitResume(mon); } @@ -596,6 +614,7 @@ qemuMonitorJSONGuestPanicExtractInfoHyperv(virJSONValue= *data) return g_steal_pointer(&ret); } + static qemuMonitorEventPanicInfo * qemuMonitorJSONGuestPanicExtractInfoS390(virJSONValue *data) { @@ -625,6 +644,7 @@ qemuMonitorJSONGuestPanicExtractInfoS390(virJSONValue *= data) return g_steal_pointer(&ret); } + static qemuMonitorEventPanicInfo * qemuMonitorJSONGuestPanicExtractInfoTDX(virJSONValue *data) { @@ -655,6 +675,7 @@ qemuMonitorJSONGuestPanicExtractInfoTDX(virJSONValue *d= ata) return g_steal_pointer(&ret); } + static qemuMonitorEventPanicInfo * qemuMonitorJSONGuestPanicExtractInfo(virJSONValue *data) { @@ -687,7 +708,9 @@ qemuMonitorJSONHandleGuestPanic(qemuMonitor *mon, } -static void qemuMonitorJSONHandleRTCChange(qemuMonitor *mon, virJSONValue = *data) +static void +qemuMonitorJSONHandleRTCChange(qemuMonitor *mon, + virJSONValue *data) { long long offset =3D 0; if (virJSONValueObjectGetNumberLong(data, "offset", &offset) < 0) { @@ -697,13 +720,17 @@ static void qemuMonitorJSONHandleRTCChange(qemuMonito= r *mon, virJSONValue *data) qemuMonitorEmitRTCChange(mon, offset); } + VIR_ENUM_DECL(qemuMonitorWatchdogAction); VIR_ENUM_IMPL(qemuMonitorWatchdogAction, VIR_DOMAIN_EVENT_WATCHDOG_LAST, "none", "pause", "reset", "poweroff", "shutdown", "debug", "= inject-nmi", ); -static void qemuMonitorJSONHandleWatchdog(qemuMonitor *mon, virJSONValue *= data) + +static void +qemuMonitorJSONHandleWatchdog(qemuMonitor *mon, + virJSONValue *data) { const char *action; int actionID; @@ -720,6 +747,7 @@ static void qemuMonitorJSONHandleWatchdog(qemuMonitor *= mon, virJSONValue *data) qemuMonitorEmitWatchdog(mon, actionID); } + VIR_ENUM_DECL(qemuMonitorIOErrorAction); VIR_ENUM_IMPL(qemuMonitorIOErrorAction, VIR_DOMAIN_EVENT_IO_ERROR_LAST, @@ -728,7 +756,8 @@ VIR_ENUM_IMPL(qemuMonitorIOErrorAction, static void -qemuMonitorJSONHandleIOError(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleIOError(qemuMonitor *mon, + virJSONValue *data) { const char *device; const char *qompath; @@ -778,6 +807,7 @@ VIR_ENUM_IMPL(qemuMonitorGraphicsAddressFamily, "ipv4", "ipv6", "unix", ); + static void qemuMonitorJSONHandleGraphicsVNC(qemuMonitor *mon, virJSONValue *data, @@ -849,19 +879,26 @@ qemuMonitorJSONHandleGraphicsVNC(qemuMonitor *mon, authScheme, x509dname, saslUsername); } -static void qemuMonitorJSONHandleVNCConnect(qemuMonitor *mon, virJSONValue= *data) + +static void +qemuMonitorJSONHandleVNCConnect(qemuMonitor *mon, + virJSONValue *data) { qemuMonitorJSONHandleGraphicsVNC(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_= CONNECT); } -static void qemuMonitorJSONHandleVNCInitialize(qemuMonitor *mon, virJSONVa= lue *data) +static void +qemuMonitorJSONHandleVNCInitialize(qemuMonitor *mon, + virJSONValue *data) { qemuMonitorJSONHandleGraphicsVNC(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_= INITIALIZE); } -static void qemuMonitorJSONHandleVNCDisconnect(qemuMonitor *mon, virJSONVa= lue *data) +static void +qemuMonitorJSONHandleVNCDisconnect(qemuMonitor *mon, + virJSONValue *data) { qemuMonitorJSONHandleGraphicsVNC(mon, data, VIR_DOMAIN_EVENT_GRAPHICS_= DISCONNECT); } @@ -931,23 +968,30 @@ qemuMonitorJSONHandleGraphicsSPICE(qemuMonitor *mon, } -static void qemuMonitorJSONHandleSPICEConnect(qemuMonitor *mon, virJSONVal= ue *data) +static void +qemuMonitorJSONHandleSPICEConnect(qemuMonitor *mon, + virJSONValue *data) { qemuMonitorJSONHandleGraphicsSPICE(mon, data, VIR_DOMAIN_EVENT_GRAPHIC= S_CONNECT); } -static void qemuMonitorJSONHandleSPICEInitialize(qemuMonitor *mon, virJSON= Value *data) +static void +qemuMonitorJSONHandleSPICEInitialize(qemuMonitor *mon, + virJSONValue *data) { qemuMonitorJSONHandleGraphicsSPICE(mon, data, VIR_DOMAIN_EVENT_GRAPHIC= S_INITIALIZE); } -static void qemuMonitorJSONHandleSPICEDisconnect(qemuMonitor *mon, virJSON= Value *data) +static void +qemuMonitorJSONHandleSPICEDisconnect(qemuMonitor *mon, + virJSONValue *data) { qemuMonitorJSONHandleGraphicsSPICE(mon, data, VIR_DOMAIN_EVENT_GRAPHIC= S_DISCONNECT); } + static void qemuMonitorJSONHandleJobStatusChange(qemuMonitor *mon, virJSONValue *data) @@ -1002,6 +1046,7 @@ qemuMonitorJSONHandleTrayChange(qemuMonitor *mon, qemuMonitorEmitTrayChange(mon, devAlias, devid, reason); } + static void qemuMonitorJSONHandlePMWakeup(qemuMonitor *mon, virJSONValue *data G_GNUC_UNUSED) @@ -1009,6 +1054,7 @@ qemuMonitorJSONHandlePMWakeup(qemuMonitor *mon, qemuMonitorEmitPMWakeup(mon); } + static void qemuMonitorJSONHandlePMSuspend(qemuMonitor *mon, virJSONValue *data G_GNUC_UNUSED) @@ -1030,6 +1076,7 @@ qemuMonitorJSONHandleBalloonChange(qemuMonitor *mon, qemuMonitorEmitBalloonChange(mon, actual); } + static void qemuMonitorJSONHandlePMSuspendDisk(qemuMonitor *mon, virJSONValue *data G_GNUC_UNUSED) @@ -1037,8 +1084,10 @@ qemuMonitorJSONHandlePMSuspendDisk(qemuMonitor *mon, qemuMonitorEmitPMSuspendDisk(mon); } + static void -qemuMonitorJSONHandleDeviceDeleted(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleDeviceDeleted(qemuMonitor *mon, + virJSONValue *data) { const char *device; @@ -1052,7 +1101,8 @@ qemuMonitorJSONHandleDeviceDeleted(qemuMonitor *mon, = virJSONValue *data) static void -qemuMonitorJSONHandleDeviceUnplugErr(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleDeviceUnplugErr(qemuMonitor *mon, + virJSONValue *data) { const char *device; const char *path; @@ -1069,7 +1119,8 @@ qemuMonitorJSONHandleDeviceUnplugErr(qemuMonitor *mon= , virJSONValue *data) static void -qemuMonitorJSONHandleNetdevStreamDisconnected(qemuMonitor *mon, virJSONVal= ue *data) +qemuMonitorJSONHandleNetdevStreamDisconnected(qemuMonitor *mon, + virJSONValue *data) { const char *name; @@ -1083,7 +1134,8 @@ qemuMonitorJSONHandleNetdevStreamDisconnected(qemuMon= itor *mon, virJSONValue *da static void -qemuMonitorJSONHandleNetdevVhostUserDisconnected(qemuMonitor *mon, virJSON= Value *data) +qemuMonitorJSONHandleNetdevVhostUserDisconnected(qemuMonitor *mon, + virJSONValue *data) { const char *name; @@ -1097,7 +1149,8 @@ qemuMonitorJSONHandleNetdevVhostUserDisconnected(qemu= Monitor *mon, virJSONValue static void -qemuMonitorJSONHandleNicRxFilterChanged(qemuMonitor *mon, virJSONValue *da= ta) +qemuMonitorJSONHandleNicRxFilterChanged(qemuMonitor *mon, + virJSONValue *data) { const char *name; @@ -1245,7 +1298,8 @@ qemuMonitorJSONHandleMigrationPass(qemuMonitor *mon, static void -qemuMonitorJSONHandleAcpiOstInfo(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleAcpiOstInfo(qemuMonitor *mon, + virJSONValue *data) { virJSONValue *info; const char *alias; @@ -1282,7 +1336,8 @@ qemuMonitorJSONHandleAcpiOstInfo(qemuMonitor *mon, vi= rJSONValue *data) static void -qemuMonitorJSONHandleBlockThreshold(qemuMonitor *mon, virJSONValue *data) +qemuMonitorJSONHandleBlockThreshold(qemuMonitor *mon, + virJSONValue *data) { const char *nodename; unsigned long long threshold; @@ -1363,8 +1418,9 @@ qemuMonitorJSONHandleDumpCompleted(qemuMonitor *mon, } -static void qemuMonitorJSONHandlePRManagerStatusChanged(qemuMonitor *mon, - virJSONValue *data) +static void +qemuMonitorJSONHandlePRManagerStatusChanged(qemuMonitor *mon, + virJSONValue *data) { const char *name; bool connected; @@ -1384,8 +1440,9 @@ static void qemuMonitorJSONHandlePRManagerStatusChang= ed(qemuMonitor *mon, } -static void qemuMonitorJSONHandleRdmaGidStatusChanged(qemuMonitor *mon, - virJSONValue *data) +static void +qemuMonitorJSONHandleRdmaGidStatusChanged(qemuMonitor *mon, + virJSONValue *data) { const char *netdev; bool gid_status; @@ -1576,7 +1633,8 @@ qemuMonitorJSONGetStatus(qemuMonitor *mon, } -int qemuMonitorJSONSystemPowerdown(qemuMonitor *mon) +int +qemuMonitorJSONSystemPowerdown(qemuMonitor *mon) { g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("system_pow= erdown", NULL); g_autoptr(virJSONValue) reply =3D NULL; @@ -1593,9 +1651,11 @@ int qemuMonitorJSONSystemPowerdown(qemuMonitor *mon) return 0; } -int qemuMonitorJSONSetLink(qemuMonitor *mon, - const char *name, - virDomainNetInterfaceLinkState state) + +int +qemuMonitorJSONSetLink(qemuMonitor *mon, + const char *name, + virDomainNetInterfaceLinkState state) { g_autoptr(virJSONValue) reply =3D NULL; g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("set_link", @@ -1615,7 +1675,9 @@ int qemuMonitorJSONSetLink(qemuMonitor *mon, return 0; } -int qemuMonitorJSONSystemReset(qemuMonitor *mon) + +int +qemuMonitorJSONSystemReset(qemuMonitor *mon) { g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("system_res= et", NULL); g_autoptr(virJSONValue) reply =3D NULL; @@ -2250,8 +2312,9 @@ qemuMonitorJSONBlockInfoAdd(GHashTable *table, } -int qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, - GHashTable *table) +int +qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, + GHashTable *table) { size_t i; g_autoptr(virJSONValue) devices =3D NULL; @@ -2823,10 +2886,11 @@ qemuMonitorJSONBlockGetNamedNodeData(qemuMonitor *m= on) } -int qemuMonitorJSONBlockResize(qemuMonitor *mon, - const char *device, - const char *nodename, - unsigned long long size) +int +qemuMonitorJSONBlockResize(qemuMonitor *mon, + const char *device, + const char *nodename, + unsigned long long size) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; @@ -2849,10 +2913,11 @@ int qemuMonitorJSONBlockResize(qemuMonitor *mon, } -int qemuMonitorJSONSetPassword(qemuMonitor *mon, - const char *protocol, - const char *password, - const char *action_if_connected) +int +qemuMonitorJSONSetPassword(qemuMonitor *mon, + const char *protocol, + const char *password, + const char *action_if_connected) { g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("set_passwo= rd", "s:protocol",= protocol, @@ -2873,9 +2938,11 @@ int qemuMonitorJSONSetPassword(qemuMonitor *mon, return 0; } -int qemuMonitorJSONExpirePassword(qemuMonitor *mon, - const char *protocol, - const char *expire_time) + +int +qemuMonitorJSONExpirePassword(qemuMonitor *mon, + const char *protocol, + const char *expire_time) { g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("expire_pas= sword", "s:protocol",= protocol, @@ -2926,11 +2993,12 @@ qemuMonitorJSONSetBalloon(qemuMonitor *mon, } -static int qemuMonitorJSONSaveMemory(qemuMonitor *mon, - const char *cmdtype, - unsigned long long offset, - unsigned long long length, - const char *path) +static int +qemuMonitorJSONSaveMemory(qemuMonitor *mon, + const char *cmdtype, + unsigned long long offset, + unsigned long long length, + const char *path) { g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand(cmdtype, "U:val", offs= et, @@ -2994,6 +3062,7 @@ qemuMonitorJSONGetMigrationParams(qemuMonitor *mon, return 0; } + int qemuMonitorJSONSetMigrationParams(qemuMonitor *mon, virJSONValue **params) @@ -3225,9 +3294,10 @@ qemuMonitorJSONGetMigrationStatsReply(virJSONValue *= reply, } -int qemuMonitorJSONGetMigrationStats(qemuMonitor *mon, - qemuMonitorMigrationStats *stats, - char **error) +int +qemuMonitorJSONGetMigrationStats(qemuMonitor *mon, + qemuMonitorMigrationStats *stats, + char **error) { g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("query-migr= ate", NULL); @@ -3251,9 +3321,10 @@ int qemuMonitorJSONGetMigrationStats(qemuMonitor *mo= n, } -int qemuMonitorJSONMigrate(qemuMonitor *mon, - unsigned int flags, - const char *uri) +int +qemuMonitorJSONMigrate(qemuMonitor *mon, + unsigned int flags, + const char *uri) { bool resume =3D !!(flags & QEMU_MONITOR_MIGRATE_RESUME); g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("migrate", @@ -3318,7 +3389,8 @@ qemuMonitorJSONGetMigrationBlockers(qemuMonitor *mon, } -int qemuMonitorJSONMigrateCancel(qemuMonitor *mon) +int +qemuMonitorJSONMigrateCancel(qemuMonitor *mon) { g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("migrate_ca= ncel", NULL); g_autoptr(virJSONValue) reply =3D NULL; @@ -3426,6 +3498,7 @@ qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonit= or *mon, return 0; } + int qemuMonitorJSONDump(qemuMonitor *mon, const char *protocol, @@ -3452,12 +3525,14 @@ qemuMonitorJSONDump(qemuMonitor *mon, return 0; } -int qemuMonitorJSONGraphicsRelocate(qemuMonitor *mon, - int type, - const char *hostname, - int port, - int tlsPort, - const char *tlsSubject) + +int +qemuMonitorJSONGraphicsRelocate(qemuMonitor *mon, + int type, + const char *hostname, + int port, + int tlsPort, + const char *tlsSubject) { const char *protocol =3D "vnc"; g_autoptr(virJSONValue) cmd =3D NULL; @@ -3577,8 +3652,9 @@ qemuMonitorJSONQueryFdsetsParse(virJSONValue *msg, } -int qemuMonitorJSONQueryFdsets(qemuMonitor *mon, - qemuMonitorFdsets **fdsets) +int +qemuMonitorJSONQueryFdsets(qemuMonitor *mon, + qemuMonitorFdsets **fdsets) { g_autoptr(virJSONValue) reply =3D NULL; g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("query-fdse= ts", @@ -3600,8 +3676,9 @@ int qemuMonitorJSONQueryFdsets(qemuMonitor *mon, } -int qemuMonitorJSONRemoveFdset(qemuMonitor *mon, - unsigned int fdset) +int +qemuMonitorJSONRemoveFdset(qemuMonitor *mon, + unsigned int fdset) { g_autoptr(virJSONValue) reply =3D NULL; g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("remove-fd", @@ -3621,9 +3698,10 @@ int qemuMonitorJSONRemoveFdset(qemuMonitor *mon, } -int qemuMonitorJSONSendFileHandle(qemuMonitor *mon, - const char *fdname, - int fd) +int +qemuMonitorJSONSendFileHandle(qemuMonitor *mon, + const char *fdname, + int fd) { g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("getfd", "s:fdname", f= dname, @@ -3643,8 +3721,9 @@ int qemuMonitorJSONSendFileHandle(qemuMonitor *mon, } -int qemuMonitorJSONCloseFileHandle(qemuMonitor *mon, - const char *fdname) +int +qemuMonitorJSONCloseFileHandle(qemuMonitor *mon, + const char *fdname) { g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("closefd", "s:fdname", f= dname, @@ -3860,7 +3939,8 @@ qemuMonitorJSONQueryRxFilterParse(virJSONValue *msg, int -qemuMonitorJSONQueryRxFilter(qemuMonitor *mon, const char *alias, +qemuMonitorJSONQueryRxFilter(qemuMonitor *mon, + const char *alias, virNetDevRxFilter **filter) { g_autoptr(virJSONValue) cmd =3D qemuMonitorJSONMakeCommand("query-rx-f= ilter", @@ -3985,8 +4065,9 @@ qemuMonitorJSONGetChardevInfo(qemuMonitor *mon, } -int qemuMonitorJSONDelDevice(qemuMonitor *mon, - const char *devalias) +int +qemuMonitorJSONDelDevice(qemuMonitor *mon, + const char *devalias) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; @@ -4126,7 +4207,8 @@ qemuMonitorJSONBlockdevMirror(qemuMonitor *mon, int -qemuMonitorJSONTransaction(qemuMonitor *mon, virJSONValue **actions) +qemuMonitorJSONTransaction(qemuMonitor *mon, + virJSONValue **actions) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; @@ -4190,10 +4272,12 @@ qemuMonitorJSONBlockCommit(qemuMonitor *mon, return 0; } -int qemuMonitorJSONArbitraryCommand(qemuMonitor *mon, - const char *cmd_str, - int fd, - char **reply_str) + +int +qemuMonitorJSONArbitraryCommand(qemuMonitor *mon, + const char *cmd_str, + int fd, + char **reply_str) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; @@ -4210,7 +4294,9 @@ int qemuMonitorJSONArbitraryCommand(qemuMonitor *mon, return 0; } -int qemuMonitorJSONInjectNMI(qemuMonitor *mon) + +int +qemuMonitorJSONInjectNMI(qemuMonitor *mon) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; @@ -4228,10 +4314,12 @@ int qemuMonitorJSONInjectNMI(qemuMonitor *mon) return 0; } -int qemuMonitorJSONSendKey(qemuMonitor *mon, - unsigned int holdtime, - unsigned int *keycodes, - unsigned int nkeycodes) + +int +qemuMonitorJSONSendKey(qemuMonitor *mon, + unsigned int holdtime, + unsigned int *keycodes, + unsigned int nkeycodes) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; @@ -4281,11 +4369,13 @@ int qemuMonitorJSONSendKey(qemuMonitor *mon, return 0; } -int qemuMonitorJSONScreendump(qemuMonitor *mon, - const char *device, - unsigned int head, - const char *format, - const char *file) + +int +qemuMonitorJSONScreendump(qemuMonitor *mon, + const char *device, + unsigned int head, + const char *format, + const char *file) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; @@ -4375,6 +4465,7 @@ qemuMonitorJSONParseBlockJobInfo(GHashTable *blockJob= s, return 0; } + GHashTable * qemuMonitorJSONGetAllBlockJobInfo(qemuMonitor *mon, bool rawjobname) @@ -4587,10 +4678,11 @@ qemuMonitorJSONJobComplete(qemuMonitor *mon, } -int qemuMonitorJSONOpenGraphics(qemuMonitor *mon, - const char *protocol, - const char *fdname, - bool skipauth) +int +qemuMonitorJSONOpenGraphics(qemuMonitor *mon, + const char *protocol, + const char *fdname, + bool skipauth) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; @@ -4706,9 +4798,11 @@ qemuMonitorJSONBlockIoThrottleInfo(virJSONValue *io_= throttle, #undef GET_THROTTLE_STATS #undef GET_THROTTLE_STATS_OPTIONAL -int qemuMonitorJSONSetBlockIoThrottle(qemuMonitor *mon, - const char *qomid, - virDomainBlockIoTuneInfo *info) + +int +qemuMonitorJSONSetBlockIoThrottle(qemuMonitor *mon, + const char *qomid, + virDomainBlockIoTuneInfo *info) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) result =3D NULL; @@ -4747,9 +4841,11 @@ int qemuMonitorJSONSetBlockIoThrottle(qemuMonitor *m= on, return 0; } -int qemuMonitorJSONGetBlockIoThrottle(qemuMonitor *mon, - const char *qdevid, - virDomainBlockIoTuneInfo *reply) + +int +qemuMonitorJSONGetBlockIoThrottle(qemuMonitor *mon, + const char *qdevid, + virDomainBlockIoTuneInfo *reply) { g_autoptr(virJSONValue) devices =3D NULL; @@ -4820,7 +4916,8 @@ qemuMonitorJSONUpdateThrottleGroup(qemuMonitor *mon, } -int qemuMonitorJSONSystemWakeup(qemuMonitor *mon) +int +qemuMonitorJSONSystemWakeup(qemuMonitor *mon) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; @@ -4838,11 +4935,13 @@ int qemuMonitorJSONSystemWakeup(qemuMonitor *mon) return 0; } -int qemuMonitorJSONGetVersion(qemuMonitor *mon, - int *major, - int *minor, - int *micro, - char **package) + +int +qemuMonitorJSONGetVersion(qemuMonitor *mon, + int *major, + int *minor, + int *micro, + char **package) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; @@ -4898,8 +4997,9 @@ int qemuMonitorJSONGetVersion(qemuMonitor *mon, } -int qemuMonitorJSONGetMachines(qemuMonitor *mon, - qemuMonitorMachineInfo ***machines) +int +qemuMonitorJSONGetMachines(qemuMonitor *mon, + qemuMonitorMachineInfo ***machines) { int ret =3D -1; g_autoptr(virJSONValue) cmd =3D NULL; @@ -5523,9 +5623,10 @@ qemuMonitorJSONGetCommandLineOptions(qemuMonitor *mo= n) } -int qemuMonitorJSONGetKVMState(qemuMonitor *mon, - bool *enabled, - bool *present) +int +qemuMonitorJSONGetKVMState(qemuMonitor *mon, + bool *enabled, + bool *present) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; @@ -5599,9 +5700,10 @@ qemuMonitorJSONGetObjectTypes(qemuMonitor *mon, } -int qemuMonitorJSONGetObjectListPaths(qemuMonitor *mon, - const char *path, - qemuMonitorJSONListPath ***paths) +int +qemuMonitorJSONGetObjectListPaths(qemuMonitor *mon, + const char *path, + qemuMonitorJSONListPath ***paths) { int ret =3D -1; g_autoptr(virJSONValue) cmd =3D NULL; @@ -5668,7 +5770,9 @@ int qemuMonitorJSONGetObjectListPaths(qemuMonitor *mo= n, return ret; } -void qemuMonitorJSONListPathFree(qemuMonitorJSONListPath *paths) + +void +qemuMonitorJSONListPathFree(qemuMonitorJSONListPath *paths) { if (!paths) return; @@ -5678,10 +5782,11 @@ void qemuMonitorJSONListPathFree(qemuMonitorJSONLis= tPath *paths) } -int qemuMonitorJSONGetObjectProperty(qemuMonitor *mon, - const char *path, - const char *property, - qemuMonitorJSONObjectProperty *prop) +int +qemuMonitorJSONGetObjectProperty(qemuMonitor *mon, + const char *path, + const char *property, + qemuMonitorJSONObjectProperty *prop) { int ret =3D -1; g_autoptr(virJSONValue) cmd =3D NULL; @@ -5786,10 +5891,11 @@ qemuMonitorJSONGetStringListProperty(qemuMonitor *m= on, "s:property", property, \ STRING, VALUE, \ NULL) -int qemuMonitorJSONSetObjectProperty(qemuMonitor *mon, - const char *path, - const char *property, - qemuMonitorJSONObjectProperty *prop) +int +qemuMonitorJSONSetObjectProperty(qemuMonitor *mon, + const char *path, + const char *property, + qemuMonitorJSONObjectProperty *prop) { g_autoptr(virJSONValue) cmd =3D NULL; g_autoptr(virJSONValue) reply =3D NULL; @@ -6394,6 +6500,7 @@ qemuMonitorJSONBuildInetSocketAddress(const char *hos= t, return g_steal_pointer(&addr); } + static virJSONValue * qemuMonitorJSONBuildUnixSocketAddress(const char *path) { @@ -6475,6 +6582,7 @@ qemuMonitorJSONNBDServerStart(qemuMonitor *mon, return 0; } + int qemuMonitorJSONNBDServerStop(qemuMonitor *mon) { @@ -6604,6 +6712,7 @@ struct _qemuMonitorJSONCPUPropsFilterData { virJSONValue *unavailableFeatures; }; + static int qemuMonitorJSONCPUPropsFilter(const char *name, virJSONValue *propData, @@ -6827,6 +6936,7 @@ qemuMonitorJSONRTCResetReinjection(qemuMonitor *mon) return 0; } + /** * Query and parse returned array of data such as: * @@ -8158,6 +8268,7 @@ qemuMonitorJSONTransactionSnapshotBlockdev(virJSONVal= ue *actions, NULL); } + VIR_ENUM_DECL(qemuMonitorTransactionBackupSyncMode); VIR_ENUM_IMPL(qemuMonitorTransactionBackupSyncMode, QEMU_MONITOR_TRANSACTION_BACKUP_SYNC_MODE_LAST, @@ -8165,6 +8276,7 @@ VIR_ENUM_IMPL(qemuMonitorTransactionBackupSyncMode, "incremental", "full"); + int qemuMonitorJSONTransactionBackup(virJSONValue *actions, const char *device, @@ -8311,6 +8423,7 @@ qemuMonitorJSONStartDirtyRateCalc(qemuMonitor *mon, return 0; } + VIR_ENUM_DECL(qemuMonitorDirtyRateStatus); VIR_ENUM_IMPL(qemuMonitorDirtyRateStatus, VIR_DOMAIN_DIRTYRATE_LAST, @@ -8318,6 +8431,7 @@ VIR_ENUM_IMPL(qemuMonitorDirtyRateStatus, "measuring", "measured"); + static int qemuMonitorJSONExtractVcpuDirtyRate(virJSONValue *data, qemuMonitorDirtyRateInfo *info) @@ -8349,6 +8463,7 @@ qemuMonitorJSONExtractVcpuDirtyRate(virJSONValue *dat= a, return 0; } + static int qemuMonitorJSONExtractDirtyRateInfo(virJSONValue *data, qemuMonitorDirtyRateInfo *info) @@ -8556,6 +8671,7 @@ qemuMonitorJSONMigrateRecover(qemuMonitor *mon, return qemuMonitorJSONCheckError(cmd, reply); } + static GHashTable * qemuMonitorJSONExtractQueryStatsSchema(virJSONValue *json) { @@ -8628,6 +8744,7 @@ qemuMonitorJSONExtractQueryStatsSchema(virJSONValue *= json) return g_steal_pointer(&schema); } + GHashTable * qemuMonitorJSONQueryStatsSchema(qemuMonitor *mon, qemuMonitorQueryStatsProviderType provider= _type) @@ -8734,9 +8851,11 @@ qemuMonitorJSONQueryStats(qemuMonitor *mon, return virJSONValueObjectStealArray(reply, "return"); } -int qemuMonitorJSONDisplayReload(qemuMonitor *mon, - const char *type, - bool tlsCerts) + +int +qemuMonitorJSONDisplayReload(qemuMonitor *mon, + const char *type, + bool tlsCerts) { g_autoptr(virJSONValue) reply =3D NULL; g_autoptr(virJSONValue) cmd =3D NULL; --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760023434; cv=none; d=zohomail.com; s=zohoarc; b=f1uLQOh64wbhU02df89orgpp+0ags8wFxEuy4SokedM74xuZpf01ZcITXh37k493IRwXXfC1ZlYYpG9Mn3aQ6mvJIMWjlHMfJHyOjPXBtnux2oc7B/jYekndC/mARLXW1rKrYZUqKwcVwqpGGDcSFw2q9BGXVH4EAPaMOVDieus= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760023434; 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=cQQrORNsrEfJtUMSUk49KJ59HvK/qrOihfKPPfHJ3Jg=; b=VynB3PrdnsA6q0dWeRBG2+pzVLyrpW0Bjy853xYN317V2r2CoG59FflhFq/ifIfBaBVxFSrXUJte+dnJeBwzbKdHeNY3seXV4Fywps7W85gfvNHZIfrhLAw3KvpVbNntSg99L8865pr651fzl+5Jd75pzXhANfmHKli4PRkQB1o= 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 1760023434857874.2255212246715; Thu, 9 Oct 2025 08:23:54 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id DC3DB43FA5; Thu, 9 Oct 2025 11:23:51 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id E2F1D441BF; Thu, 9 Oct 2025 11:16:59 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 5620E43E48; Thu, 9 Oct 2025 11:16:28 -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 1431443E6E for ; Thu, 9 Oct 2025 11:16:26 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-391-62Xpf_YJPge6Luf9ATUIUQ-1; Thu, 09 Oct 2025 11:16:23 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 38019180034C for ; Thu, 9 Oct 2025 15:16:23 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 33AEA1955F22 for ; Thu, 9 Oct 2025 15:16:21 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022985; 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=cQQrORNsrEfJtUMSUk49KJ59HvK/qrOihfKPPfHJ3Jg=; b=LLMXsh7vcl3rnaWYar4aqt15hoscgszpC6ZOjoAwcrkNyt6XalM3JpcbLlmlxkmTEx53Qz PIVn2s+0wTBoAQ58F/R0/qwLZMShYC+DaGpEz3ecURrlGc4pZsewg/Z2UyUsV94G+/Ss8a jbFqGU3AUinRJ9rJKWZcDwSopuL96aM= X-MC-Unique: 62Xpf_YJPge6Luf9ATUIUQ-1 X-Mimecast-MFC-AGG-ID: 62Xpf_YJPge6Luf9ATUIUQ_1760022983 To: devel@lists.libvirt.org Subject: [RFC PATCH 03/16] qemu_monitor_json.h: Use consistent function hader coding style Date: Thu, 9 Oct 2025 17:16:03 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 9j7T09jYH82sY843YewXzEH1inBd_cIa3MrJ-_a7nJQ_1760022983 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: V35NRNJUDUQFK7C67SXLRIG32F5BN5WB X-Message-ID-Hash: V35NRNJUDUQFK7C67SXLRIG32F5BN5WB 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: 1760023437907116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Convert the rest of the header file to the new prevailing coding style. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_monitor.h | 1139 ++++++++++++++++++++++++--------------- 1 file changed, 691 insertions(+), 448 deletions(-) diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 6427fd42cd..82354a83d9 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -182,11 +182,17 @@ struct _qemuMonitorJobInfo { }; -char *qemuMonitorGuestPanicEventInfoFormatMsg(qemuMonitorEventPanicInfo *i= nfo); -void qemuMonitorEventPanicInfoFree(qemuMonitorEventPanicInfo *info); +char * +qemuMonitorGuestPanicEventInfoFormatMsg(qemuMonitorEventPanicInfo *info); +void +qemuMonitorEventPanicInfoFree(qemuMonitorEventPanicInfo *info); G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorEventPanicInfo, qemuMonitorEventP= anicInfoFree); -void qemuMonitorEventRdmaGidStatusFree(qemuMonitorRdmaGidStatus *info); -void qemuMonitorMemoryDeviceSizeChangeFree(qemuMonitorMemoryDeviceSizeChan= ge *info); + +void +qemuMonitorEventRdmaGidStatusFree(qemuMonitorRdmaGidStatus *info); + +void +qemuMonitorMemoryDeviceSizeChangeFree(qemuMonitorMemoryDeviceSizeChange *i= nfo); typedef void (*qemuMonitorDestroyCallback)(qemuMonitor *mon, virDomainObj *vm); @@ -420,143 +426,227 @@ struct _qemuMonitorCallbacks { qemuMonitorDomainNetdevVhostUserDisconnectedCallback domainNetdevVhost= UserDisconnected; }; -qemuMonitor *qemuMonitorOpen(virDomainObj *vm, - virDomainChrSourceDef *config, - GMainContext *context, - qemuMonitorCallbacks *cb) +qemuMonitor * +qemuMonitorOpen(virDomainObj *vm, + virDomainChrSourceDef *config, + GMainContext *context, + qemuMonitorCallbacks *cb) ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(4); -void qemuMonitorWatchDispose(void); -bool qemuMonitorWasDisposed(void); +void +qemuMonitorWatchDispose(void); + +bool +qemuMonitorWasDisposed(void); -void qemuMonitorRegister(qemuMonitor *mon) +void +qemuMonitorRegister(qemuMonitor *mon) ATTRIBUTE_NONNULL(1); -void qemuMonitorUnregister(qemuMonitor *mon) + +void +qemuMonitorUnregister(qemuMonitor *mon) ATTRIBUTE_NONNULL(1); -void qemuMonitorClose(qemuMonitor *mon); -virErrorPtr qemuMonitorLastError(qemuMonitor *mon); +void +qemuMonitorClose(qemuMonitor *mon); + +virErrorPtr +qemuMonitorLastError(qemuMonitor *mon); -int qemuMonitorSetCapabilities(qemuMonitor *mon); +int +qemuMonitorSetCapabilities(qemuMonitor *mon); -int qemuMonitorSetLink(qemuMonitor *mon, - const char *name, - virDomainNetInterfaceLinkState state) +int +qemuMonitorSetLink(qemuMonitor *mon, + const char *name, + virDomainNetInterfaceLinkState state) ATTRIBUTE_NONNULL(2); /* These APIs are for use by the internal Text/JSON monitor impl code only= */ -char *qemuMonitorNextCommandID(qemuMonitor *mon); -int qemuMonitorSend(qemuMonitor *mon, - qemuMonitorMessage *msg) ATTRIBUTE_MOCKABLE; -int qemuMonitorUpdateVideoMemorySize(qemuMonitor *mon, - virDomainVideoDef *video, - const char *videoName) +char * +qemuMonitorNextCommandID(qemuMonitor *mon); + +int +qemuMonitorSend(qemuMonitor *mon, + qemuMonitorMessage *msg) ATTRIBUTE_MOCKABLE; + +int +qemuMonitorUpdateVideoMemorySize(qemuMonitor *mon, + virDomainVideoDef *video, + const char *videoName) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -int qemuMonitorUpdateVideoVram64Size(qemuMonitor *mon, - virDomainVideoDef *video, - const char *videoName) + +int +qemuMonitorUpdateVideoVram64Size(qemuMonitor *mon, + virDomainVideoDef *video, + const char *videoName) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3); -void qemuMonitorEmitEvent(qemuMonitor *mon, const char *event, - long long seconds, unsigned int micros, - const char *details); -void qemuMonitorEmitShutdown(qemuMonitor *mon, virTristateBool guest, cons= t char *reason); -void qemuMonitorEmitReset(qemuMonitor *mon); -void qemuMonitorEmitStop(qemuMonitor *mon); -void qemuMonitorEmitResume(qemuMonitor *mon); -void qemuMonitorEmitRTCChange(qemuMonitor *mon, long long offset); -void qemuMonitorEmitWatchdog(qemuMonitor *mon, int action); -void qemuMonitorEmitIOError(qemuMonitor *mon, - const char *device, - const char *qompath, - const char *nodename, - int action, - bool nospace, - const char *reason); -void qemuMonitorEmitGraphics(qemuMonitor *mon, - int phase, - int localFamily, - const char *localNode, - const char *localService, - int remoteFamily, - const char *remoteNode, - const char *remoteService, - const char *authScheme, - const char *x509dname, - const char *saslUsername); -void qemuMonitorEmitTrayChange(qemuMonitor *mon, - const char *devAlias, - const char *devid, - int reason); -void qemuMonitorEmitPMWakeup(qemuMonitor *mon); -void qemuMonitorEmitPMSuspend(qemuMonitor *mon); -void qemuMonitorEmitJobStatusChange(qemuMonitor *mon, - const char *jobname, - qemuMonitorJobStatus status); -void qemuMonitorEmitBalloonChange(qemuMonitor *mon, - unsigned long long actual); -void qemuMonitorEmitPMSuspendDisk(qemuMonitor *mon); -void qemuMonitorEmitGuestPanic(qemuMonitor *mon, - qemuMonitorEventPanicInfo *info); -void qemuMonitorEmitDeviceDeleted(qemuMonitor *mon, +void +qemuMonitorEmitEvent(qemuMonitor *mon, + const char *event, + long long seconds, + unsigned int micros, + const char *details); + +void +qemuMonitorEmitShutdown(qemuMonitor *mon, + virTristateBool guest, + const char *reason); + +void +qemuMonitorEmitReset(qemuMonitor *mon); + +void +qemuMonitorEmitStop(qemuMonitor *mon); + +void +qemuMonitorEmitResume(qemuMonitor *mon); + +void +qemuMonitorEmitRTCChange(qemuMonitor *mon, + long long offset); + +void +qemuMonitorEmitWatchdog(qemuMonitor *mon, + int action); + +void +qemuMonitorEmitIOError(qemuMonitor *mon, + const char *device, + const char *qompath, + const char *nodename, + int action, + bool nospace, + const char *reason); + +void +qemuMonitorEmitGraphics(qemuMonitor *mon, + int phase, + int localFamily, + const char *localNode, + const char *localService, + int remoteFamily, + const char *remoteNode, + const char *remoteService, + const char *authScheme, + const char *x509dname, + const char *saslUsername); + +void +qemuMonitorEmitTrayChange(qemuMonitor *mon, + const char *devAlias, + const char *devid, + int reason); + +void +qemuMonitorEmitPMWakeup(qemuMonitor *mon); + +void +qemuMonitorEmitPMSuspend(qemuMonitor *mon); + +void +qemuMonitorEmitJobStatusChange(qemuMonitor *mon, + const char *jobname, + qemuMonitorJobStatus status); + +void +qemuMonitorEmitBalloonChange(qemuMonitor *mon, + unsigned long long actual); + +void +qemuMonitorEmitPMSuspendDisk(qemuMonitor *mon); + +void +qemuMonitorEmitGuestPanic(qemuMonitor *mon, + qemuMonitorEventPanicInfo *info); + +void +qemuMonitorEmitDeviceDeleted(qemuMonitor *mon, + const char *devAlias); + +void +qemuMonitorEmitDeviceUnplugErr(qemuMonitor *mon, + const char *devPath, + const char *devAlias); + +void +qemuMonitorEmitNetdevStreamDisconnected(qemuMonitor *mon, + const char *devAlias); + +void +qemuMonitorEmitNetdevVhostUserDisconnected(qemuMonitor *mon, + const char *devAlias); + +void +qemuMonitorEmitNicRxFilterChanged(qemuMonitor *mon, const char *devAlias); -void qemuMonitorEmitDeviceUnplugErr(qemuMonitor *mon, - const char *devPath, - const char *devAlias); -void qemuMonitorEmitNetdevStreamDisconnected(qemuMonitor *mon, - const char *devAlias); -void qemuMonitorEmitNetdevVhostUserDisconnected(qemuMonitor *mon, - const char *devAlias); -void qemuMonitorEmitNicRxFilterChanged(qemuMonitor *mon, - const char *devAlias); -void qemuMonitorEmitSerialChange(qemuMonitor *mon, - const char *devAlias, - bool connected); -void qemuMonitorEmitSpiceMigrated(qemuMonitor *mon); - -void qemuMonitorEmitMemoryDeviceSizeChange(qemuMonitor *mon, - const char *devAlias, - unsigned long long size); - -void qemuMonitorEmitMemoryFailure(qemuMonitor *mon, - qemuMonitorEventMemoryFailure *mfp); - -void qemuMonitorEmitMigrationStatus(qemuMonitor *mon, - int status); -void qemuMonitorEmitMigrationPass(qemuMonitor *mon, - int pass); - -void qemuMonitorEmitAcpiOstInfo(qemuMonitor *mon, - const char *alias, - const char *slotType, - const char *slot, - unsigned int source, - unsigned int status); - -void qemuMonitorEmitBlockThreshold(qemuMonitor *mon, - const char *nodename, - unsigned long long threshold, - unsigned long long excess); - -void qemuMonitorEmitDumpCompleted(qemuMonitor *mon, - int status, - qemuMonitorDumpStats *stats, - const char *error); - -void qemuMonitorEmitPRManagerStatusChanged(qemuMonitor *mon, - const char *prManager, - bool connected); - -void qemuMonitorEmitRdmaGidStatusChanged(qemuMonitor *mon, - const char *netdev, - bool gid_status, - unsigned long long subnet_prefix, - unsigned long long interface_id); - -void qemuMonitorEmitGuestCrashloaded(qemuMonitor *mon); - -int qemuMonitorStartCPUs(qemuMonitor *mon); -int qemuMonitorStopCPUs(qemuMonitor *mon); + +void +qemuMonitorEmitSerialChange(qemuMonitor *mon, + const char *devAlias, + bool connected); + +void +qemuMonitorEmitSpiceMigrated(qemuMonitor *mon); + +void +qemuMonitorEmitMemoryDeviceSizeChange(qemuMonitor *mon, + const char *devAlias, + unsigned long long size); + +void +qemuMonitorEmitMemoryFailure(qemuMonitor *mon, + qemuMonitorEventMemoryFailure *mfp); + +void +qemuMonitorEmitMigrationStatus(qemuMonitor *mon, + int status); + +void +qemuMonitorEmitMigrationPass(qemuMonitor *mon, + int pass); + +void +qemuMonitorEmitAcpiOstInfo(qemuMonitor *mon, + const char *alias, + const char *slotType, + const char *slot, + unsigned int source, + unsigned int status); + +void +qemuMonitorEmitBlockThreshold(qemuMonitor *mon, + const char *nodename, + unsigned long long threshold, + unsigned long long excess); + +void +qemuMonitorEmitDumpCompleted(qemuMonitor *mon, + int status, + qemuMonitorDumpStats *stats, + const char *error); + +void +qemuMonitorEmitPRManagerStatusChanged(qemuMonitor *mon, + const char *prManager, + bool connected); + +void +qemuMonitorEmitRdmaGidStatusChanged(qemuMonitor *mon, + const char *netdev, + bool gid_status, + unsigned long long subnet_prefix, + unsigned long long interface_id); + +void +qemuMonitorEmitGuestCrashloaded(qemuMonitor *mon); + +int +qemuMonitorStartCPUs(qemuMonitor *mon); + +int +qemuMonitorStopCPUs(qemuMonitor *mon); typedef enum { QEMU_MONITOR_VM_STATUS_DEBUG, @@ -577,15 +667,21 @@ typedef enum { QEMU_MONITOR_VM_STATUS_LAST } qemuMonitorVMStatus; VIR_ENUM_DECL(qemuMonitorVMStatus); -int qemuMonitorVMStatusToPausedReason(const char *status); -int qemuMonitorGetStatus(qemuMonitor *mon, - bool *running, - virDomainPausedReason *reason) +int +qemuMonitorVMStatusToPausedReason(const char *status); + +int +qemuMonitorGetStatus(qemuMonitor *mon, + bool *running, + virDomainPausedReason *reason) ATTRIBUTE_NONNULL(2); -int qemuMonitorSystemReset(qemuMonitor *mon); -int qemuMonitorSystemPowerdown(qemuMonitor *mon); +int +qemuMonitorSystemReset(qemuMonitor *mon); + +int +qemuMonitorSystemPowerdown(qemuMonitor *mon); struct qemuMonitorQueryCpusEntry { int qemu_id; /* id of the cpu as reported by qemu */ @@ -593,8 +689,10 @@ struct qemuMonitorQueryCpusEntry { char *qom_path; bool halted; }; -void qemuMonitorQueryCpusFree(struct qemuMonitorQueryCpusEntry *entries, - size_t nentries); + +void +qemuMonitorQueryCpusFree(struct qemuMonitorQueryCpusEntry *entries, + size_t nentries); struct qemuMonitorQueryHotpluggableCpusEntry { @@ -617,8 +715,10 @@ struct qemuMonitorQueryHotpluggableCpusEntry { /* internal data */ int enable_id; }; -void qemuMonitorQueryHotpluggableCpusFree(struct qemuMonitorQueryHotplugga= bleCpusEntry *entries, - size_t nentries); + +void +qemuMonitorQueryHotpluggableCpusFree(struct qemuMonitorQueryHotpluggableCp= usEntry *entries, + size_t nentries); struct _qemuMonitorCPUInfo { @@ -655,27 +755,39 @@ struct _qemuMonitorCPUInfo { }; typedef struct _qemuMonitorCPUInfo qemuMonitorCPUInfo; -void qemuMonitorCPUInfoFree(qemuMonitorCPUInfo *cpus, - size_t ncpus); -int qemuMonitorGetCPUInfo(qemuMonitor *mon, - qemuMonitorCPUInfo **vcpus, - size_t maxvcpus, - bool hotplug); +void +qemuMonitorCPUInfoFree(qemuMonitorCPUInfo *cpus, + size_t ncpus); + +int +qemuMonitorGetCPUInfo(qemuMonitor *mon, + qemuMonitorCPUInfo **vcpus, + size_t maxvcpus, + bool hotplug); + virBitmap *qemuMonitorGetCpuHalted(qemuMonitor *mon, size_t maxvcpus); -int qemuMonitorGetBalloonInfo(qemuMonitor *mon, - unsigned long long *currmem); -int qemuMonitorGetMemoryStats(qemuMonitor *mon, - virDomainMemballoonDef *balloon, - virDomainMemoryStatPtr stats, - unsigned int nr_stats); -int qemuMonitorSetMemoryStatsPeriod(qemuMonitor *mon, - virDomainMemballoonDef *balloon, - int period); +int +qemuMonitorGetBalloonInfo(qemuMonitor *mon, + unsigned long long *currmem); -int qemuMonitorBlockIOStatusToError(const char *status); -GHashTable *qemuMonitorGetBlockInfo(qemuMonitor *mon); +int +qemuMonitorGetMemoryStats(qemuMonitor *mon, + virDomainMemballoonDef *balloon, + virDomainMemoryStatPtr stats, + unsigned int nr_stats); + +int +qemuMonitorSetMemoryStatsPeriod(qemuMonitor *mon, + virDomainMemballoonDef *balloon, + int period); + +int +qemuMonitorBlockIOStatusToError(const char *status); + +GHashTable * +qemuMonitorGetBlockInfo(qemuMonitor *mon); typedef struct _qemuBlockStats qemuBlockStats; struct _qemuBlockStats { @@ -699,12 +811,14 @@ struct _qemuBlockStats { unsigned long long write_threshold; }; -int qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, - GHashTable **ret_stats) +int +qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, + GHashTable **ret_stats) ATTRIBUTE_NONNULL(2); -int qemuMonitorBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, - GHashTable *stats) +int +qemuMonitorBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, + GHashTable *stats) ATTRIBUTE_NONNULL(2); typedef struct _qemuBlockNamedNodeDataBitmap qemuBlockNamedNodeDataBitmap; @@ -754,39 +868,54 @@ struct _qemuBlockNamedNodeData { GHashTable * qemuMonitorBlockGetNamedNodeData(qemuMonitor *mon); -int qemuMonitorBlockResize(qemuMonitor *mon, - const char *device, - const char *nodename, - unsigned long long size); -int qemuMonitorSetPassword(qemuMonitor *mon, - int type, - const char *password, - const char *action_if_connected); -int qemuMonitorExpirePassword(qemuMonitor *mon, - int type, - const char *expire_time); -int qemuMonitorSetBalloon(qemuMonitor *mon, - unsigned long long newmem); - -int qemuMonitorSaveVirtualMemory(qemuMonitor *mon, - unsigned long long offset, - unsigned long long length, - const char *path); -int qemuMonitorSavePhysicalMemory(qemuMonitor *mon, - unsigned long long offset, - unsigned long long length, - const char *path); - -int qemuMonitorSetDBusVMStateIdList(qemuMonitor *mon, - GSList *list); - -int qemuMonitorSetUSBDiskAttached(qemuMonitor *mon, - const char *alias); - -int qemuMonitorGetMigrationParams(qemuMonitor *mon, - virJSONValue **params); -int qemuMonitorSetMigrationParams(qemuMonitor *mon, - virJSONValue **params); +int +qemuMonitorBlockResize(qemuMonitor *mon, + const char *device, + const char *nodename, + unsigned long long size); + +int +qemuMonitorSetPassword(qemuMonitor *mon, + int type, + const char *password, + const char *action_if_connected); + +int +qemuMonitorExpirePassword(qemuMonitor *mon, + int type, + const char *expire_time); + +int +qemuMonitorSetBalloon(qemuMonitor *mon, + unsigned long long newmem); + +int +qemuMonitorSaveVirtualMemory(qemuMonitor *mon, + unsigned long long offset, + unsigned long long length, + const char *path); + +int +qemuMonitorSavePhysicalMemory(qemuMonitor *mon, + unsigned long long offset, + unsigned long long length, + const char *path); + +int +qemuMonitorSetDBusVMStateIdList(qemuMonitor *mon, + GSList *list); + +int +qemuMonitorSetUSBDiskAttached(qemuMonitor *mon, + const char *alias); + +int +qemuMonitorGetMigrationParams(qemuMonitor *mon, + virJSONValue **params); + +int +qemuMonitorSetMigrationParams(qemuMonitor *mon, + virJSONValue **params); typedef enum { QEMU_MONITOR_MIGRATION_STATUS_INACTIVE, @@ -853,69 +982,85 @@ struct _qemuMonitorMigrationStats { unsigned long long vfio_data_transferred; }; -int qemuMonitorGetMigrationStats(qemuMonitor *mon, - qemuMonitorMigrationStats *stats, - char **error); +int +qemuMonitorGetMigrationStats(qemuMonitor *mon, + qemuMonitorMigrationStats *stats, + char **error); -int qemuMonitorGetMigrationCapabilities(qemuMonitor *mon, - char ***capabilities); -int qemuMonitorSetMigrationCapabilities(qemuMonitor *mon, - virJSONValue **caps); +int +qemuMonitorGetMigrationCapabilities(qemuMonitor *mon, + char ***capabilities); -int qemuMonitorGetGICCapabilities(qemuMonitor *mon, - virGICCapability **capabilities); +int +qemuMonitorSetMigrationCapabilities(qemuMonitor *mon, + virJSONValue **caps); -int qemuMonitorGetSEVCapabilities(qemuMonitor *mon, - virSEVCapability **capabilities); +int +qemuMonitorGetGICCapabilities(qemuMonitor *mon, + virGICCapability **capabilities); + +int +qemuMonitorGetSEVCapabilities(qemuMonitor *mon, + virSEVCapability **capabilities); -int qemuMonitorGetSGXCapabilities(qemuMonitor *mon, - virSGXCapability **capabilities); +int +qemuMonitorGetSGXCapabilities(qemuMonitor *mon, + virSGXCapability **capabilities); typedef enum { QEMU_MONITOR_MIGRATE_RESUME =3D 1 << 0, /* resume failed post-= copy migration */ QEMU_MONITOR_MIGRATION_FLAGS_LAST } QEMU_MONITOR_MIGRATE; -int qemuMonitorMigrateToFd(qemuMonitor *mon, - unsigned int flags, - int fd); +int +qemuMonitorMigrateToFd(qemuMonitor *mon, + unsigned int flags, + int fd); -int qemuMonitorMigrateToFdSet(virDomainObj *vm, - unsigned int flags, - int *fd, - int *directFd); +int +qemuMonitorMigrateToFdSet(virDomainObj *vm, + unsigned int flags, + int *fd, + int *directFd); -int qemuMonitorMigrateToHost(qemuMonitor *mon, - unsigned int flags, - const char *protocol, - const char *hostname, - int port); +int +qemuMonitorMigrateToHost(qemuMonitor *mon, + unsigned int flags, + const char *protocol, + const char *hostname, + int port); -int qemuMonitorMigrateToSocket(qemuMonitor *mon, - unsigned int flags, - const char *socketPath); +int +qemuMonitorMigrateToSocket(qemuMonitor *mon, + unsigned int flags, + const char *socketPath); -int qemuMonitorMigrateCancel(qemuMonitor *mon); +int +qemuMonitorMigrateCancel(qemuMonitor *mon); int qemuMonitorMigratePause(qemuMonitor *mon); -int qemuMonitorGetDumpGuestMemoryCapability(qemuMonitor *mon, - const char *capability); +int +qemuMonitorGetDumpGuestMemoryCapability(qemuMonitor *mon, + const char *capability); -int qemuMonitorQueryDump(qemuMonitor *mon, - qemuMonitorDumpStats *stats); +int +qemuMonitorQueryDump(qemuMonitor *mon, + qemuMonitorDumpStats *stats); -int qemuMonitorDumpToFd(qemuMonitor *mon, - int fd, - const char *dumpformat); +int +qemuMonitorDumpToFd(qemuMonitor *mon, + int fd, + const char *dumpformat); -int qemuMonitorGraphicsRelocate(qemuMonitor *mon, - int type, - const char *hostname, - int port, - int tlsPort, - const char *tlsSubject); +int +qemuMonitorGraphicsRelocate(qemuMonitor *mon, + int type, + const char *hostname, + int port, + int tlsPort, + const char *tlsSubject); int qemuMonitorAddFileHandleToSet(qemuMonitor *mon, @@ -942,120 +1087,150 @@ struct _qemuMonitorFdsets { qemuMonitorFdsetInfo *fdsets; int nfdsets; }; -void qemuMonitorFdsetsFree(qemuMonitorFdsets *fdsets); + +void +qemuMonitorFdsetsFree(qemuMonitorFdsets *fdsets); G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorFdsets, qemuMonitorFdsetsFree); -int qemuMonitorQueryFdsets(qemuMonitor *mon, - qemuMonitorFdsets **fdsets); -int qemuMonitorSendFileHandle(qemuMonitor *mon, - const char *fdname, - int fd); +int +qemuMonitorQueryFdsets(qemuMonitor *mon, + qemuMonitorFdsets **fdsets); + +int +qemuMonitorSendFileHandle(qemuMonitor *mon, + const char *fdname, + int fd); /* This function preserves previous error and only set their own * error if no error was set before. */ -int qemuMonitorCloseFileHandle(qemuMonitor *mon, - const char *fdname); +int +qemuMonitorCloseFileHandle(qemuMonitor *mon, + const char *fdname); -int qemuMonitorAddNetdev(qemuMonitor *mon, - virJSONValue **props); +int +qemuMonitorAddNetdev(qemuMonitor *mon, + virJSONValue **props); -int qemuMonitorRemoveNetdev(qemuMonitor *mon, - const char *alias); +int +qemuMonitorRemoveNetdev(qemuMonitor *mon, + const char *alias); -int qemuMonitorQueryRxFilter(qemuMonitor *mon, const char *alias, - virNetDevRxFilter **filter); +int +qemuMonitorQueryRxFilter(qemuMonitor *mon, + const char *alias, + virNetDevRxFilter **filter); typedef struct _qemuMonitorChardevInfo qemuMonitorChardevInfo; struct _qemuMonitorChardevInfo { char *ptyPath; virDomainChrDeviceState state; }; -void qemuMonitorChardevInfoFree(void *data); -int qemuMonitorGetChardevInfo(qemuMonitor *mon, - GHashTable **retinfo); +void +qemuMonitorChardevInfoFree(void *data); + +int +qemuMonitorGetChardevInfo(qemuMonitor *mon, + GHashTable **retinfo); -int qemuMonitorAddDeviceProps(qemuMonitor *mon, - virJSONValue **props); +int +qemuMonitorAddDeviceProps(qemuMonitor *mon, + virJSONValue **props); -int qemuMonitorDelDevice(qemuMonitor *mon, - const char *devalias); +int +qemuMonitorDelDevice(qemuMonitor *mon, + const char *devalias); -int qemuMonitorCreateObjectProps(virJSONValue **propsret, - const char *type, - const char *alias, - ...) +int +qemuMonitorCreateObjectProps(virJSONValue **propsret, + const char *type, + const char *alias, + ...) G_GNUC_NULL_TERMINATED; -int qemuMonitorAddObject(qemuMonitor *mon, - virJSONValue **props, - char **alias) +int +qemuMonitorAddObject(qemuMonitor *mon, + virJSONValue **props, + char **alias) ATTRIBUTE_NONNULL(2); -int qemuMonitorDelObject(qemuMonitor *mon, - const char *objalias, - bool report_error); +int +qemuMonitorDelObject(qemuMonitor *mon, + const char *objalias, + bool report_error); -int qemuMonitorTransaction(qemuMonitor *mon, virJSONValue **actions) +int +qemuMonitorTransaction(qemuMonitor *mon, + virJSONValue **actions) ATTRIBUTE_NONNULL(2); -int qemuMonitorBlockdevMirror(qemuMonitor *mon, - const char *jobname, - bool persistjob, - const char *device, - const char *target, - const char *replaces, - unsigned long long bandwidth, - unsigned int granularity, - unsigned long long buf_size, - bool shallow, - bool syncWrite) + +int +qemuMonitorBlockdevMirror(qemuMonitor *mon, + const char *jobname, + bool persistjob, + const char *device, + const char *target, + const char *replaces, + unsigned long long bandwidth, + unsigned int granularity, + unsigned long long buf_size, + bool shallow, + bool syncWrite) ATTRIBUTE_NONNULL(4) ATTRIBUTE_NONNULL(5); -int qemuMonitorBlockCommit(qemuMonitor *mon, - const char *device, - const char *jobname, - const char *topNode, - const char *baseNode, - const char *backingName, - unsigned long long bandwidth, - virTristateBool autofinalize) +int +qemuMonitorBlockCommit(qemuMonitor *mon, + const char *device, + const char *jobname, + const char *topNode, + const char *baseNode, + const char *backingName, + unsigned long long bandwidth, + virTristateBool autofinalize) ATTRIBUTE_NONNULL(2); -int qemuMonitorArbitraryCommand(qemuMonitor *mon, - const char *cmd, - int fd, - char **reply, - bool hmp); +int +qemuMonitorArbitraryCommand(qemuMonitor *mon, + const char *cmd, + int fd, + char **reply, + bool hmp); -int qemuMonitorInjectNMI(qemuMonitor *mon); +int +qemuMonitorInjectNMI(qemuMonitor *mon); -int qemuMonitorScreendump(qemuMonitor *mon, - const char *device, - unsigned int head, - const char *format, - const char *file); - -int qemuMonitorSendKey(qemuMonitor *mon, - unsigned int holdtime, - unsigned int *keycodes, - unsigned int nkeycodes); - -int qemuMonitorBlockStream(qemuMonitor *mon, - const char *device, - const char *jobname, - const char *baseNode, - const char *backingName, - unsigned long long bandwidth) +int +qemuMonitorScreendump(qemuMonitor *mon, + const char *device, + unsigned int head, + const char *format, + const char *file); + +int +qemuMonitorSendKey(qemuMonitor *mon, + unsigned int holdtime, + unsigned int *keycodes, + unsigned int nkeycodes); + +int +qemuMonitorBlockStream(qemuMonitor *mon, + const char *device, + const char *jobname, + const char *baseNode, + const char *backingName, + unsigned long long bandwidth) ATTRIBUTE_NONNULL(2); -int qemuMonitorBlockJobCancel(qemuMonitor *mon, - const char *jobname, - bool force) +int +qemuMonitorBlockJobCancel(qemuMonitor *mon, + const char *jobname, + bool force) ATTRIBUTE_NONNULL(2); -int qemuMonitorBlockJobSetSpeed(qemuMonitor *mon, - const char *jobname, - unsigned long long bandwidth); +int +qemuMonitorBlockJobSetSpeed(qemuMonitor *mon, + const char *jobname, + unsigned long long bandwidth); typedef struct _qemuMonitorBlockJobInfo qemuMonitorBlockJobInfo; struct _qemuMonitorBlockJobInfo { @@ -1067,11 +1242,13 @@ struct _qemuMonitorBlockJobInfo { bool ready; }; -GHashTable *qemuMonitorGetAllBlockJobInfo(qemuMonitor *mon, - bool rawjobname); +GHashTable * +qemuMonitorGetAllBlockJobInfo(qemuMonitor *mon, + bool rawjobname); -int qemuMonitorJobDismiss(qemuMonitor *mon, - const char *jobname) +int +qemuMonitorJobDismiss(qemuMonitor *mon, + const char *jobname) ATTRIBUTE_NONNULL(2); int @@ -1079,23 +1256,27 @@ qemuMonitorJobFinalize(qemuMonitor *mon, const char *jobname) ATTRIBUTE_NONNULL(2); -int qemuMonitorJobComplete(qemuMonitor *mon, - const char *jobname) +int +qemuMonitorJobComplete(qemuMonitor *mon, + const char *jobname) ATTRIBUTE_NONNULL(2); -int qemuMonitorOpenGraphics(qemuMonitor *mon, - const char *protocol, - int fd, - const char *fdname, - bool skipauth); +int +qemuMonitorOpenGraphics(qemuMonitor *mon, + const char *protocol, + int fd, + const char *fdname, + bool skipauth); -int qemuMonitorSetBlockIoThrottle(qemuMonitor *mon, - const char *qomid, - virDomainBlockIoTuneInfo *info); +int +qemuMonitorSetBlockIoThrottle(qemuMonitor *mon, + const char *qomid, + virDomainBlockIoTuneInfo *info); -int qemuMonitorGetBlockIoThrottle(qemuMonitor *mon, - const char *qdevid, - virDomainBlockIoTuneInfo *reply); +int +qemuMonitorGetBlockIoThrottle(qemuMonitor *mon, + const char *qdevid, + virDomainBlockIoTuneInfo *reply); int qemuMonitorThrottleGroupLimits(virJSONValue *limits, @@ -1106,13 +1287,15 @@ qemuMonitorUpdateThrottleGroup(qemuMonitor *mon, const char *qomid, virDomainBlockIoTuneInfo *info); -int qemuMonitorSystemWakeup(qemuMonitor *mon); +int +qemuMonitorSystemWakeup(qemuMonitor *mon); -int qemuMonitorGetVersion(qemuMonitor *mon, - int *major, - int *minor, - int *micro, - char **package) +int +qemuMonitorGetVersion(qemuMonitor *mon, + int *major, + int *minor, + int *micro, + char **package) ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(4); @@ -1130,10 +1313,12 @@ struct _qemuMonitorMachineInfo { virTristateBool acpi; }; -int qemuMonitorGetMachines(qemuMonitor *mon, - qemuMonitorMachineInfo ***machines); +int +qemuMonitorGetMachines(qemuMonitor *mon, + qemuMonitorMachineInfo ***machines); -void qemuMonitorMachineInfoFree(qemuMonitorMachineInfo *machine); +void +qemuMonitorMachineInfoFree(qemuMonitorMachineInfo *machine); typedef struct _qemuMonitorCPUDefInfo qemuMonitorCPUDefInfo; struct _qemuMonitorCPUDefInfo { @@ -1150,11 +1335,19 @@ struct _qemuMonitorCPUDefs { qemuMonitorCPUDefInfo *cpus; }; -int qemuMonitorGetCPUDefinitions(qemuMonitor *mon, - qemuMonitorCPUDefs **cpuDefs); -qemuMonitorCPUDefs *qemuMonitorCPUDefsNew(size_t count); -qemuMonitorCPUDefs *qemuMonitorCPUDefsCopy(qemuMonitorCPUDefs *src); -void qemuMonitorCPUDefsFree(qemuMonitorCPUDefs *defs); +int +qemuMonitorGetCPUDefinitions(qemuMonitor *mon, + qemuMonitorCPUDefs **cpuDefs); + +qemuMonitorCPUDefs * +qemuMonitorCPUDefsNew(size_t count); + +qemuMonitorCPUDefs * +qemuMonitorCPUDefsCopy(qemuMonitorCPUDefs *src); + +void +qemuMonitorCPUDefsFree(qemuMonitorCPUDefs *defs); + G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorCPUDefs, qemuMonitorCPUDefsFree); @@ -1195,87 +1388,114 @@ typedef enum { QEMU_MONITOR_CPU_MODEL_EXPANSION_FULL, } qemuMonitorCPUModelExpansionType; -int qemuMonitorGetCPUModelExpansion(qemuMonitor *mon, - qemuMonitorCPUModelExpansionType type, - virCPUDef *cpu, - bool migratable, - bool hv_passthrough, - bool fail_no_props, - qemuMonitorCPUModelInfo **model_info); +int +qemuMonitorGetCPUModelExpansion(qemuMonitor *mon, + qemuMonitorCPUModelExpansionType type, + virCPUDef *cpu, + bool migratable, + bool hv_passthrough, + bool fail_no_props, + qemuMonitorCPUModelInfo **model_info); + +void +qemuMonitorCPUModelInfoFree(qemuMonitorCPUModelInfo *model_info); -void qemuMonitorCPUModelInfoFree(qemuMonitorCPUModelInfo *model_info); G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorCPUModelInfo, qemuMonitorCPUModel= InfoFree); -int qemuMonitorGetCPUModelBaseline(qemuMonitor *mon, - virCPUDef *cpu_a, - virCPUDef *cpu_b, - qemuMonitorCPUModelInfo **baseline); +int +qemuMonitorGetCPUModelBaseline(qemuMonitor *mon, + virCPUDef *cpu_a, + virCPUDef *cpu_b, + qemuMonitorCPUModelInfo **baseline); -int qemuMonitorGetCPUModelComparison(qemuMonitor *mon, - virCPUDef *cpu_a, - virCPUDef *cpu_b, - char **result); +int +qemuMonitorGetCPUModelComparison(qemuMonitor *mon, + virCPUDef *cpu_a, + virCPUDef *cpu_b, + char **result); qemuMonitorCPUModelInfo * qemuMonitorCPUModelInfoCopy(const qemuMonitorCPUModelInfo *orig); -GHashTable *qemuMonitorGetCommandLineOptions(qemuMonitor *mon); +GHashTable * +qemuMonitorGetCommandLineOptions(qemuMonitor *mon); -int qemuMonitorGetKVMState(qemuMonitor *mon, - bool *enabled, - bool *present); +int +qemuMonitorGetKVMState(qemuMonitor *mon, + bool *enabled, + bool *present); -int qemuMonitorGetObjectTypes(qemuMonitor *mon, - char ***types); -GHashTable *qemuMonitorGetDeviceProps(qemuMonitor *mon, - const char *device); -int qemuMonitorGetObjectProps(qemuMonitor *mon, - const char *object, - char ***props); -char *qemuMonitorGetTargetArch(qemuMonitor *mon); +int +qemuMonitorGetObjectTypes(qemuMonitor *mon, + char ***types); + +GHashTable * +qemuMonitorGetDeviceProps(qemuMonitor *mon, + const char *device); + +int +qemuMonitorGetObjectProps(qemuMonitor *mon, + const char *object, + char ***props); + +char * +qemuMonitorGetTargetArch(qemuMonitor *mon); -int qemuMonitorNBDServerStart(qemuMonitor *mon, - const virStorageNetHostDef *server, - const char *tls_alias) +int +qemuMonitorNBDServerStart(qemuMonitor *mon, + const virStorageNetHostDef *server, + const char *tls_alias) ATTRIBUTE_NONNULL(2); -int qemuMonitorNBDServerStop(qemuMonitor *mon); -int qemuMonitorBlockExportAdd(qemuMonitor *mon, - virJSONValue **props); +int +qemuMonitorNBDServerStop(qemuMonitor *mon); + +int +qemuMonitorBlockExportAdd(qemuMonitor *mon, + virJSONValue **props); + +int +qemuMonitorAttachCharDev(qemuMonitor *mon, + virJSONValue **props, + char **ptypath); -int qemuMonitorAttachCharDev(qemuMonitor *mon, - virJSONValue **props, - char **ptypath); -int qemuMonitorDetachCharDev(qemuMonitor *mon, - const char *chrID); +int +qemuMonitorDetachCharDev(qemuMonitor *mon, + const char *chrID); -int qemuMonitorGetDeviceAliases(qemuMonitor *mon, - char ***aliases); +int +qemuMonitorGetDeviceAliases(qemuMonitor *mon, + char ***aliases); typedef void (*qemuMonitorReportDomainLogError)(qemuMonitor *mon, const char *msg, void *opaque); -void qemuMonitorSetDomainLogLocked(qemuMonitor *mon, - qemuMonitorReportDomainLogError func, - void *opaque, - virFreeCallback destroy); -void qemuMonitorSetDomainLog(qemuMonitor *mon, - qemuMonitorReportDomainLogError func, - void *opaque, - virFreeCallback destroy); +void +qemuMonitorSetDomainLogLocked(qemuMonitor *mon, + qemuMonitorReportDomainLogError func, + void *opaque, + virFreeCallback destroy); + +void +qemuMonitorSetDomainLog(qemuMonitor *mon, + qemuMonitorReportDomainLogError func, + void *opaque, + virFreeCallback destroy); typedef const char *(*qemuMonitorCPUFeatureTranslationCallback)(virArch ar= ch, const char= *name); -int qemuMonitorGetGuestCPU(qemuMonitor *mon, - virArch arch, - bool qomListGet, - const char *cpuQOMPath, - qemuMonitorCPUFeatureTranslationCallback transl= ate, - virCPUData **enabled, - virCPUData **disabled); +int +qemuMonitorGetGuestCPU(qemuMonitor *mon, + virArch arch, + bool qomListGet, + const char *cpuQOMPath, + qemuMonitorCPUFeatureTranslationCallback translate, + virCPUData **enabled, + virCPUData **disabled); -int qemuMonitorRTCResetReinjection(qemuMonitor *mon); +int +qemuMonitorRTCResetReinjection(qemuMonitor *mon); typedef struct _qemuMonitorIOThreadInfo qemuMonitorIOThreadInfo; struct _qemuMonitorIOThreadInfo { @@ -1293,11 +1513,14 @@ struct _qemuMonitorIOThreadInfo { bool set_thread_pool_min; bool set_thread_pool_max; }; -int qemuMonitorGetIOThreads(qemuMonitor *mon, - qemuMonitorIOThreadInfo ***iothreads, - int *niothreads); -int qemuMonitorSetIOThread(qemuMonitor *mon, - qemuMonitorIOThreadInfo *iothreadInfo); + +int +qemuMonitorGetIOThreads(qemuMonitor *mon, + qemuMonitorIOThreadInfo ***iothreads, + int *niothreads); +int +qemuMonitorSetIOThread(qemuMonitor *mon, + qemuMonitorIOThreadInfo *iothreadInfo); typedef struct _qemuMonitorMemoryDeviceInfo qemuMonitorMemoryDeviceInfo; struct _qemuMonitorMemoryDeviceInfo { @@ -1310,57 +1533,73 @@ struct _qemuMonitorMemoryDeviceInfo { unsigned long long size; /* in bytes */ }; -int qemuMonitorGetMemoryDeviceInfo(qemuMonitor *mon, - GHashTable **info) +int +qemuMonitorGetMemoryDeviceInfo(qemuMonitor *mon, + GHashTable **info) ATTRIBUTE_NONNULL(2); -int qemuMonitorMigrateIncoming(qemuMonitor *mon, - const char *uri, - virTristateBool exitOnError); +int +qemuMonitorMigrateIncoming(qemuMonitor *mon, + const char *uri, + virTristateBool exitOnError); -int qemuMonitorMigrateStartPostCopy(qemuMonitor *mon); +int +qemuMonitorMigrateStartPostCopy(qemuMonitor *mon); -int qemuMonitorMigrateContinue(qemuMonitor *mon, - qemuMonitorMigrationStatus status); +int +qemuMonitorMigrateContinue(qemuMonitor *mon, + qemuMonitorMigrationStatus status); -int qemuMonitorGetRTCTime(qemuMonitor *mon, - struct tm *tm); +int +qemuMonitorGetRTCTime(qemuMonitor *mon, + struct tm *tm); -virJSONValue *qemuMonitorQueryQMPSchema(qemuMonitor *mon); +virJSONValue * +qemuMonitorQueryQMPSchema(qemuMonitor *mon); -int qemuMonitorSetBlockThreshold(qemuMonitor *mon, - const char *nodename, - unsigned long long threshold); +int +qemuMonitorSetBlockThreshold(qemuMonitor *mon, + const char *nodename, + unsigned long long threshold); -int qemuMonitorSetWatchdogAction(qemuMonitor *mon, - const char *action); +int +qemuMonitorSetWatchdogAction(qemuMonitor *mon, + const char *action); -int qemuMonitorBlockdevCreate(qemuMonitor *mon, - const char *jobname, - virJSONValue **props); +int +qemuMonitorBlockdevCreate(qemuMonitor *mon, + const char *jobname, + virJSONValue **props); -int qemuMonitorBlockdevAdd(qemuMonitor *mon, - virJSONValue **props); +int +qemuMonitorBlockdevAdd(qemuMonitor *mon, + virJSONValue **props); -int qemuMonitorBlockdevReopen(qemuMonitor *mon, - virJSONValue **options); +int +qemuMonitorBlockdevReopen(qemuMonitor *mon, + virJSONValue **options); -int qemuMonitorBlockdevDel(qemuMonitor *mon, - const char *nodename); +int +qemuMonitorBlockdevDel(qemuMonitor *mon, + const char *nodename); -int qemuMonitorBlockdevTrayOpen(qemuMonitor *mon, - const char *id, - bool force); +int +qemuMonitorBlockdevTrayOpen(qemuMonitor *mon, + const char *id, + bool force); -int qemuMonitorBlockdevTrayClose(qemuMonitor *mon, - const char *id); +int +qemuMonitorBlockdevTrayClose(qemuMonitor *mon, + const char *id); -int qemuMonitorBlockdevMediumRemove(qemuMonitor *mon, - const char *id); +int +qemuMonitorBlockdevMediumRemove(qemuMonitor *mon, + const char *id); -int qemuMonitorBlockdevMediumInsert(qemuMonitor *mon, - const char *id, - const char *nodename); +int +qemuMonitorBlockdevMediumInsert(qemuMonitor *mon, + const char *id, + const char *nodename); char * qemuMonitorGetSEVMeasurement(qemuMonitor *mon); @@ -1415,23 +1654,27 @@ struct _qemuMonitorPRManagerInfo { bool connected; }; -int qemuMonitorGetPRManagerInfo(qemuMonitor *mon, - GHashTable **retinfo); +int +qemuMonitorGetPRManagerInfo(qemuMonitor *mon, + GHashTable **retinfo); typedef struct _qemuMonitorCurrentMachineInfo qemuMonitorCurrentMachineIn= fo; struct _qemuMonitorCurrentMachineInfo { bool wakeupSuspendSupport; }; -int qemuMonitorGetCurrentMachineInfo(qemuMonitor *mon, - qemuMonitorCurrentMachineInfo *info); -void qemuMonitorJobInfoFree(qemuMonitorJobInfo *job); +int +qemuMonitorGetCurrentMachineInfo(qemuMonitor *mon, + qemuMonitorCurrentMachineInfo *info); +void +qemuMonitorJobInfoFree(qemuMonitorJobInfo *job); G_DEFINE_AUTOPTR_CLEANUP_FUNC(qemuMonitorJobInfo, qemuMonitorJobInfoFree); -int qemuMonitorGetJobInfo(qemuMonitor *mon, - qemuMonitorJobInfo ***jobs, - size_t *njobs); +int +qemuMonitorGetJobInfo(qemuMonitor *mon, + qemuMonitorJobInfo ***jobs, + size_t *njobs); int qemuMonitorGetCPUMigratable(qemuMonitor *mon, --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760023559; cv=none; d=zohomail.com; s=zohoarc; b=aUX7dYr/BJTzKXr8U5ESXhhD7f6EWtmYBDydDnOKuV6mu8SE2875r4DJoqMTLC8JNJVPJP84DjwqDlfrFrWek0D9Uat+79tGuqOTDiTWIpjy0d7J5Qbye4t9XpiJZQDvdy+Fn3TnrarxUHRof48EX0pBxp/o8sfYOjZvMpLkDSQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760023559; 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=Xq/AyZFOW5S//e2PyibUlNQ9Uvh/AAs0OTIj8eAt6KY=; b=QqsY+BXno4PluhC14/CK98IOgIwxd6uktFK1UqOCE0km559wqyM+S+vUljsEe+ujyCivARa1JOA3mNuDwoUsGD1ua2HEpbbhFBKWFgKm6anlvjmcpQoeI6OtT8UOuhvVd8fX+Fcmq3zDq9bXvdF9N+BnRS2anR+yz5RlSDdvYmg= 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 1760023559576453.8423261838924; Thu, 9 Oct 2025 08:25:59 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id F23EF41A7E; Thu, 9 Oct 2025 11:25:57 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 59C7443F95; Thu, 9 Oct 2025 11:17:04 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 9763B43E48; Thu, 9 Oct 2025 11:16:28 -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 6E79F43E87 for ; Thu, 9 Oct 2025 11:16:27 -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-454-MszMnAj2MEKTBYr70P65yw-1; Thu, 09 Oct 2025 11:16:25 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 93F4E19560A7 for ; Thu, 9 Oct 2025 15:16:24 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B03CA1953947 for ; Thu, 9 Oct 2025 15:16:23 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022987; 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=Xq/AyZFOW5S//e2PyibUlNQ9Uvh/AAs0OTIj8eAt6KY=; b=YK3t5SFjAgvOnv/w4Pr1Z1k2E/bPN2n+Ivl3ObnxwFWdJKDZgaKHOBt9r4WQJdSXr48NXm dB0qSBXvwVGHeeff1gd35AH4HENxtNz9QJuExm77mXmenjhXkl2JatN4NPVDcCWpAH+enq OVts9kuPwiqoq1LHFBN4ShWpP9CN5ZY= X-MC-Unique: MszMnAj2MEKTBYr70P65yw-1 X-Mimecast-MFC-AGG-ID: MszMnAj2MEKTBYr70P65yw_1760022984 To: devel@lists.libvirt.org Subject: [RFC PATCH 04/16] qemu: monitor: Rework qemuBlockStats into a g_object Date: Thu, 9 Oct 2025 17:16:04 +0200 Message-ID: <37c97d037108086029bdaf748495a263c8b14193.1760022633.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: EcJOYWDzpHNVTUFpSWuyAx9cxMOYXN3-50jqMaIL9Dg_1760022984 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: US36KK7JZ5KLHFRGFM6PP32Z5ON2YU5Y X-Message-ID-Hash: US36KK7JZ5KLHFRGFM6PP32Z5ON2YU5Y 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: 1760023562632154100 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Create the g_object boilerplate and store references in the hash table instead of copies. This will simplify upcoming code which will add allocated fields into qemuBlockStats. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_driver.c | 32 ++++++----------------- src/qemu/qemu_monitor.c | 38 ++++++++++++++++++++++++++- src/qemu/qemu_monitor.h | 7 ++++- src/qemu/qemu_monitor_json.c | 50 ++++++++---------------------------- 4 files changed, 62 insertions(+), 65 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index ac72ea5cb0..b6d83f1dc6 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9613,7 +9613,6 @@ qemuDomainBlocksStatsGather(virDomainObj *vm, qemuDomainObjPrivate *priv =3D vm->privateData; virDomainDiskDef *disk =3D NULL; g_autoptr(GHashTable) blockstats =3D NULL; - qemuBlockStats *stats; size_t i; int nstats; int rc =3D 0; @@ -9654,29 +9653,15 @@ qemuDomainBlocksStatsGather(virDomainObj *vm, if (nstats < 0 || rc < 0) return -1; - *retstats =3D g_new0(qemuBlockStats, 1); - if (entryname) { - qemuBlockStats *capstats; - - if (!(stats =3D virHashLookup(blockstats, entryname))) { + if (!(*retstats =3D virHashSteal(blockstats, entryname))) { virReportError(VIR_ERR_INTERNAL_ERROR, _("cannot find statistics for device '%1$s'"), = entryname); return -1; } - - **retstats =3D *stats; - - /* capacity are reported only per node-name so we need to transfer= them */ - if (disk && disk->src && - (capstats =3D virHashLookup(blockstats, qemuBlockStorageSource= GetEffectiveNodename(disk->src)))) { - (*retstats)->capacity =3D capstats->capacity; - (*retstats)->physical =3D capstats->physical; - (*retstats)->wr_highest_offset =3D capstats->wr_highest_offset; - (*retstats)->wr_highest_offset_valid =3D capstats->wr_highest_= offset_valid; - (*retstats)->write_threshold =3D capstats->write_threshold; - } } else { + g_autoptr(qemuBlockStats) stats =3D qemuBlockStatsNew(); + for (i =3D 0; i < vm->def->ndisks; i++) { disk =3D vm->def->disks[i]; entryname =3D disk->info.alias; @@ -9699,6 +9684,8 @@ qemuDomainBlocksStatsGather(virDomainObj *vm, qemuDomainBlockStatsGatherTotals(stats, *retstats); } + + *retstats =3D g_steal_pointer(&stats); } return nstats; @@ -9710,7 +9697,7 @@ qemuDomainBlockStats(virDomainPtr dom, const char *path, virDomainBlockStatsPtr stats) { - qemuBlockStats *blockstats =3D NULL; + g_autoptr(qemuBlockStats) blockstats =3D NULL; int ret =3D -1; virDomainObj *vm; @@ -9747,7 +9734,6 @@ qemuDomainBlockStats(virDomainPtr dom, cleanup: virDomainObjEndAPI(&vm); - VIR_FREE(blockstats); return ret; } @@ -9760,7 +9746,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, unsigned int flags) { virDomainObj *vm; - qemuBlockStats *blockstats =3D NULL; + g_autoptr(qemuBlockStats) blockstats =3D NULL; int nstats; int ret =3D -1; @@ -9833,7 +9819,6 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, virDomainObjEndJob(vm); cleanup: - VIR_FREE(blockstats); virDomainObjEndAPI(&vm); return ret; } @@ -10565,7 +10550,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom, int ret =3D -1; virDomainDiskDef *disk; g_autoptr(virQEMUDriverConfig) cfg =3D NULL; - qemuBlockStats *entry =3D NULL; + g_autoptr(qemuBlockStats) entry =3D NULL; virCheckFlags(0, -1); @@ -10663,7 +10648,6 @@ qemuDomainGetBlockInfo(virDomainPtr dom, endjob: virDomainObjEndJob(vm); cleanup: - VIR_FREE(entry); virDomainObjEndAPI(&vm); return ret; } diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 7b09792c5d..ce6220fbfb 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1967,6 +1967,42 @@ qemuMonitorGetBlockInfo(qemuMonitor *mon) } +G_DEFINE_TYPE(qemuBlockStats, qemu_block_stats, G_TYPE_OBJECT); + +static void +qemu_block_stats_init(qemuBlockStats *stats G_GNUC_UNUSED) +{ +} + + +static void +qemuBlockStatsFinalize(GObject *object) +{ + qemuBlockStats *stats =3D QEMU_BLOCK_STATS(object); + + if (!stats) + return; + + G_OBJECT_CLASS(qemu_block_stats_parent_class)->finalize(object); +} + + +static void +qemu_block_stats_class_init(qemuBlockStatsClass *klass) +{ + GObjectClass *obj =3D G_OBJECT_CLASS(klass); + + obj->finalize =3D qemuBlockStatsFinalize; +} + + +qemuBlockStats * +qemuBlockStatsNew(void) +{ + return g_object_new(qemu_block_stats_get_type(), NULL); +} + + /** * qemuMonitorGetAllBlockStatsInfo: * @mon: monitor object @@ -1982,7 +2018,7 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable **ret_stats) { int ret; - g_autoptr(GHashTable) stats =3D virHashNew(g_free); + g_autoptr(GHashTable) stats =3D virHashNew(g_object_unref); QEMU_CHECK_MONITOR(mon); diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 82354a83d9..4f94edb05f 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -789,8 +789,9 @@ qemuMonitorBlockIOStatusToError(const char *status); GHashTable * qemuMonitorGetBlockInfo(qemuMonitor *mon); -typedef struct _qemuBlockStats qemuBlockStats; struct _qemuBlockStats { + GObject parent; + unsigned long long rd_req; unsigned long long rd_bytes; unsigned long long wr_req; @@ -810,6 +811,10 @@ struct _qemuBlockStats { /* write_threshold is valid only if it's non-zero, conforming to qemu = semantics */ unsigned long long write_threshold; }; +G_DECLARE_FINAL_TYPE(qemuBlockStats, qemu_block_stats, QEMU, BLOCK_STATS, = GObject); + +qemuBlockStats * +qemuBlockStatsNew(void); int qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 2dbaa7a798..7b7d446b3a 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2390,7 +2390,7 @@ static qemuBlockStats * qemuMonitorJSONBlockStatsCollectData(virJSONValue *dev, int *nstats) { - g_autofree qemuBlockStats *bstats =3D NULL; + g_autoptr(qemuBlockStats) bstats =3D NULL; virJSONValue *parent; virJSONValue *parentstats; virJSONValue *stats; @@ -2401,7 +2401,7 @@ qemuMonitorJSONBlockStatsCollectData(virJSONValue *de= v, return NULL; } - bstats =3D g_new0(qemuBlockStats, 1); + bstats =3D qemuBlockStatsNew(); #define QEMU_MONITOR_BLOCK_STAT_GET(NAME, VAR, MANDATORY) \ if (MANDATORY || virJSONValueObjectHasKey(stats, NAME)) { \ @@ -2433,34 +2433,13 @@ qemuMonitorJSONBlockStatsCollectData(virJSONValue *= dev, } -static int -qemuMonitorJSONAddOneBlockStatsInfo(qemuBlockStats *bstats, - const char *name, - GHashTable *stats) -{ - qemuBlockStats *copy =3D NULL; - - copy =3D g_new0(qemuBlockStats, 1); - - if (bstats) - *copy =3D *bstats; - - if (virHashAddEntry(stats, name, copy) < 0) { - VIR_FREE(copy); - return -1; - } - - return 0; -} - - static int qemuMonitorJSONGetOneBlockStatsInfo(virJSONValue *dev, const char *dev_name, int depth, GHashTable *hash) { - g_autofree qemuBlockStats *bstats =3D NULL; + g_autoptr(qemuBlockStats) bstats =3D NULL; int nstats =3D 0; const char *qdevname =3D NULL; const char *nodename =3D NULL; @@ -2482,17 +2461,14 @@ qemuMonitorJSONGetOneBlockStatsInfo(virJSONValue *d= ev, if (!(bstats =3D qemuMonitorJSONBlockStatsCollectData(dev, &nstats))) return -1; - if (devicename && - qemuMonitorJSONAddOneBlockStatsInfo(bstats, devicename, hash) < 0) - return -1; + if (devicename) + g_hash_table_insert(hash, g_strdup(devicename), g_object_ref(bstat= s)); - if (qdevname && STRNEQ_NULLABLE(qdevname, devicename) && - qemuMonitorJSONAddOneBlockStatsInfo(bstats, qdevname, hash) < 0) - return -1; + if (qdevname && STRNEQ_NULLABLE(qdevname, devicename)) + g_hash_table_insert(hash, g_strdup(qdevname), g_object_ref(bstats)= ); - if (nodename && - qemuMonitorJSONAddOneBlockStatsInfo(bstats, nodename, hash) < 0) - return -1; + if (nodename) + g_hash_table_insert(hash, g_strdup(nodename), g_object_ref(bstats)= ); if ((backing =3D virJSONValueObjectGetObject(dev, "backing")) && qemuMonitorJSONGetOneBlockStatsInfo(backing, dev_name, depth + 1, = hash) < 0) @@ -2617,12 +2593,8 @@ qemuMonitorJSONBlockStatsUpdateCapacityData(virJSONV= alue *image, qemuBlockStats *bstats; if (!(bstats =3D virHashLookup(stats, name))) { - bstats =3D g_new0(qemuBlockStats, 1); - - if (virHashAddEntry(stats, name, bstats) < 0) { - VIR_FREE(bstats); - return -1; - } + bstats =3D qemuBlockStatsNew(); + g_hash_table_insert(stats, g_strdup(name), bstats); } if (entry) --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760023659; cv=none; d=zohomail.com; s=zohoarc; b=cMrD/7DFUKJN2NEgWFTGGMpAPsUzV56VaebOLOSWhMQ8PvBS802lzkJRCpYP2xrHclFKW8//b0GufiM3zc23lIgMnBL7HgrZVVFztIn7Hn9doM6abV+bsJ2OMheWqHPxIqEXu1iKGpbAzhsMMUjTYFHLQS018y+EOMPR8mhMxqI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760023659; 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=2wtoEDRU7BjCCh2TuG/dNubjDo+C455tRCGzIZ+lias=; b=URjRTYW5lCO/+sB0Pa9RFeyvI9g/c4INbH5uIGpD0ZxTl6OSgsJVv7R2D0iru7WRdAi3uhYkKvcp8ToEsjBzR6SeHziY3MPad9/tOwnBYjWIosHC+agEAzHyEJvnOhL9VrRUG92+ghXuy+qdGN9hIAT27B2zKp2ZfMT4KlyYcpc= 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 1760023659150924.0789518282076; Thu, 9 Oct 2025 08:27:39 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 643C343F49; Thu, 9 Oct 2025 11:27:38 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 7BD9A4431D; Thu, 9 Oct 2025 11:17:09 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 7951E43E70; Thu, 9 Oct 2025 11:16:29 -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 CC1DA43E6E for ; Thu, 9 Oct 2025 11:16:28 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-387-6i1QjOBkOOGdTPt4YHliDQ-1; Thu, 09 Oct 2025 11:16:26 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BC1E81800451 for ; Thu, 9 Oct 2025 15:16:25 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F007F1955F22 for ; Thu, 9 Oct 2025 15:16:24 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022988; 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=2wtoEDRU7BjCCh2TuG/dNubjDo+C455tRCGzIZ+lias=; b=eOJSCwjCf+xx4rBWoBrEqgE3siNMW/o4oKQ7G6lI/gPCrt+rkdBmkj/oDmwI35/OusSACg s/NgI3QUD+/3wEy2KQPqSLWLICrfnxbLW1TUaP6ryLgBYM2vJbaToJ94csFRN/cK0yc3Jv ewCM56HpNiPj/eURsIGo4Mm7DpEXQlU= X-MC-Unique: 6i1QjOBkOOGdTPt4YHliDQ-1 X-Mimecast-MFC-AGG-ID: 6i1QjOBkOOGdTPt4YHliDQ_1760022985 To: devel@lists.libvirt.org Subject: [RFC PATCH 05/16] qemuMigrationCookieAddNBD: Use qemuBlockGetNamedNodeData to fetch the capacities Date: Thu, 9 Oct 2025 17:16:05 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: tYMLGsfPoUr8-I1Jd6CyWKgqw8kubbzGxg7ED_Gd-2Q_1760022985 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: VPYCKOKX526Q7FEBFIPNCWMEQZQSE7UL X-Message-ID-Hash: VPYCKOKX526Q7FEBFIPNCWMEQZQSE7UL 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: 1760023661618154100 Content-Type: text/plain; charset="utf-8" From: Peter Krempa 'qemuMonitorBlockStatsUpdateCapacityBlockdev' uses the same command internally. Upcoming patches will want to merge qemuMonitorBlockStatsUpdateCapacityBloc= kdev into qemuMonitorGetAllBlockStatsInfo and qemuMigrationCookieAddNBD is the only place that doesn't call qemuMonitorGetAllBlockStatsInfo. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_migration_cookie.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_migration_cookie.c b/src/qemu/qemu_migration_coo= kie.c index 01529c99b8..7311a8294b 100644 --- a/src/qemu/qemu_migration_cookie.c +++ b/src/qemu/qemu_migration_cookie.c @@ -478,9 +478,8 @@ qemuMigrationCookieAddNBD(qemuMigrationCookie *mig, virDomainObj *vm) { qemuDomainObjPrivate *priv =3D vm->privateData; - g_autoptr(GHashTable) stats =3D virHashNew(g_free); + g_autoptr(GHashTable) blockNamedNodeData =3D NULL; size_t i; - int rc; /* It is not a bug if there already is a NBD data */ qemuMigrationCookieNBDFree(mig->nbd); @@ -496,21 +495,15 @@ qemuMigrationCookieAddNBD(qemuMigrationCookie *mig, mig->nbd->disks =3D g_new0(struct qemuMigrationCookieNBDDisk, vm->def-= >ndisks); mig->nbd->ndisks =3D 0; - if (qemuDomainObjEnterMonitorAsync(vm, vm->job->asyncJob) < 0) - return -1; - - rc =3D qemuMonitorBlockStatsUpdateCapacityBlockdev(priv->mon, stats); - - qemuDomainObjExitMonitor(vm); - - if (rc < 0) + if (!(blockNamedNodeData =3D qemuBlockGetNamedNodeData(vm, vm->job->as= yncJob))) return -1; for (i =3D 0; i < vm->def->ndisks; i++) { virDomainDiskDef *disk =3D vm->def->disks[i]; - qemuBlockStats *entry; + qemuBlockNamedNodeData *entry; - if (!(entry =3D virHashLookup(stats, qemuBlockStorageSourceGetEffe= ctiveNodename(disk->src)))) + if (!(entry =3D virHashLookup(blockNamedNodeData, + qemuBlockStorageSourceGetEffectiveNode= name(disk->src)))) continue; mig->nbd->disks[mig->nbd->ndisks].target =3D g_strdup(disk->dst); --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760023727; cv=none; d=zohomail.com; s=zohoarc; b=JSjDncyD3OCtWEOPj3tqq22XpjDsJsjJG8scC5mcDcxqXeqkeVEkeWZjN8dunCA8RqI7U9W3agPVFeCRQxXtxWSX4UcCq9rTb4nCvXTO4fJUBzc5T4RpMh7WghQCuSJGXB7gll1XmsAAsKR4euMPiXrd1edV8tzof0zCVv9x/qQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760023727; 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=pctFQSYSFfA12zdy/aV4TQE2ElOl3ugbTuLSdJGWfTo=; b=T6fW7NE2Z3Eyz+AmfgagfBlt3GoToQAatkJTXq5USJFNgOseMePPWrKaOnVn9FKHIIJPouAuyq/mxOVe4/SKyheWUO19qRnnah4VM7CDEoHx/iHNE5AG8lGwsyweYx64xpSZjFJOe/muW88zI3uRuCzeDB2XTYqBlE8bimsyeNY= 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 176002372742151.221648891884456; Thu, 9 Oct 2025 08:28:47 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 57B2744004; Thu, 9 Oct 2025 11:28:44 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 3C51643FD2; Thu, 9 Oct 2025 11:17:14 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 6D39143E48; Thu, 9 Oct 2025 11:16:30 -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 B76E843E6E for ; Thu, 9 Oct 2025 11:16:29 -0400 (EDT) Received: from mx-prod-mc-04.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-326-zSowh3RQOIm0rwXXHDDFTw-1; Thu, 09 Oct 2025 11:16:27 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 067B919560AE for ; Thu, 9 Oct 2025 15:16:27 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3DECA1955F22 for ; Thu, 9 Oct 2025 15:16:26 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022989; 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=pctFQSYSFfA12zdy/aV4TQE2ElOl3ugbTuLSdJGWfTo=; b=ge28oW1pFkInFHFAODWoBgyxqlURqD4g1QrKK4ecgmfn9NpepMZdlgXoipNf49pt3FD7v9 2APFxKmVC1ipopXZ/mfPzoVgcEGvGZmkV3qonKAhOsNcPKV7fJCjTovp8KpKAwL3bEe3tD AEzHa7fl8C6aPHeXTx2MGsIj0/ZP80Y= X-MC-Unique: zSowh3RQOIm0rwXXHDDFTw-1 X-Mimecast-MFC-AGG-ID: zSowh3RQOIm0rwXXHDDFTw_1760022987 To: devel@lists.libvirt.org Subject: [RFC PATCH 06/16] qemuMonitorJSONBlockStatsUpdateCapacityData: Merge into caller Date: Thu, 9 Oct 2025 17:16:06 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: NoaFlCX9DES6GkN7hAqJyrga8ZvwdYKXkG9IXCByFRs_1760022987 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 4REFFSAUFAWR5GRXETI736MZO4WCHYIE X-Message-ID-Hash: 4REFFSAUFAWR5GRXETI736MZO4WCHYIE 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: 1760023731088116601 Content-Type: text/plain; charset="utf-8" From: Peter Krempa It's called just from qemuMonitorJSONBlockStatsUpdateCapacityBlockdevWorker. Merging it in makes the code much simpler especially when combined with a change to APIs that can't fail. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_monitor_json.c | 48 ++++++++++-------------------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 7b7d446b3a..44d7a35874 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2584,36 +2584,6 @@ qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, } -static int -qemuMonitorJSONBlockStatsUpdateCapacityData(virJSONValue *image, - const char *name, - GHashTable *stats, - qemuBlockStats **entry) -{ - qemuBlockStats *bstats; - - if (!(bstats =3D virHashLookup(stats, name))) { - bstats =3D qemuBlockStatsNew(); - g_hash_table_insert(stats, g_strdup(name), bstats); - } - - if (entry) - *entry =3D bstats; - - /* failures can be ignored after this point */ - if (virJSONValueObjectGetNumberUlong(image, "virtual-size", - &bstats->capacity) < 0) - return 0; - - /* if actual-size is missing, image is not thin provisioned */ - if (virJSONValueObjectGetNumberUlong(image, "actual-size", - &bstats->physical) < 0) - bstats->physical =3D bstats->capacity; - - return 0; -} - - static int qemuMonitorJSONBlockStatsUpdateCapacityBlockdevWorker(size_t pos G_GNUC_UN= USED, virJSONValue *val, @@ -2631,12 +2601,20 @@ qemuMonitorJSONBlockStatsUpdateCapacityBlockdevWork= er(size_t pos G_GNUC_UNUSED, return -1; } - if (qemuMonitorJSONBlockStatsUpdateCapacityData(image, nodename, stats= , &entry) < 0) - return -1; + if (!(entry =3D virHashLookup(stats, nodename))) { + entry =3D qemuBlockStatsNew(); + g_hash_table_insert(stats, g_strdup(nodename), entry); + } + + /* updating actual size makes sense only when virtual size is present = */ + if (virJSONValueObjectGetNumberUlong(image, "virtual-size", &entry->ca= pacity) =3D=3D 0) { + /* if actual-size is missing, image is not thin provisioned */ + if (virJSONValueObjectGetNumberUlong(image, "actual-size", &entry-= >physical) < 0) + entry->physical =3D entry->capacity; + } - if (entry) - ignore_value(virJSONValueObjectGetNumberUlong(val, "write_threshol= d", - &entry->write_thresh= old)); + ignore_value(virJSONValueObjectGetNumberUlong(val, "write_threshold", + &entry->write_threshold)= ); return 1; /* we don't want to steal the value from the JSON array */ } --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760023783; cv=none; d=zohomail.com; s=zohoarc; b=EtbWTdc6hxn/AfSW6f5Y6+f51i9HaSq/Z+2bjtldWgXqbofmDPLOCZKGZErAWAFxVnXlzfR/pRMpwpYLsOczHo4glWNqsR1jTaNMbby4/5Wq3ofY2kO/C/ZyLpaYdulZ2bOTOMPup2pnfmkwxu+b+ZtggItvyRFGoFLwXTb0TX0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760023783; 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=DUr/GCWXAvG3dDrfW9+I+xFSkeu4kMZZX8swj2Rg+wI=; b=k9cg2+N3sF1hMxVej/sct/nNrQmvP3RScZqizH+5SDcMapVRP32sd+Ms0PCM9UcvfF08YTWh1oYVDTw0GhQfc3no9TFrlJgHye2DXt070yaBVvRJO4OG5FCe2fZqxJ+Mn1HKmUVP/CRkwUh85txMpGAFAexQ01pWM71MNY914bc= 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 1760023783675284.3678885063754; Thu, 9 Oct 2025 08:29:43 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id B2E884182E; Thu, 9 Oct 2025 11:29:42 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 3DBB2446D2; Thu, 9 Oct 2025 11:17:18 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 75ED344216; Thu, 9 Oct 2025 11:16:38 -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 0173543ED9 for ; Thu, 9 Oct 2025 11:16:30 -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-452-UllLcaWwOUOmXtFk8ZKwkg-1; Thu, 09 Oct 2025 11:16:29 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 48F3A19560AE for ; Thu, 9 Oct 2025 15:16:28 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7E9161955F22 for ; Thu, 9 Oct 2025 15:16:27 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022990; 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=DUr/GCWXAvG3dDrfW9+I+xFSkeu4kMZZX8swj2Rg+wI=; b=iTPAmaMYx+N5WNh33LN5Z914qccmkIZV6v8Xhoj2t3tddhdfYvETZuxh+Bg10ouukTE3UF rfilwoZBSG+bu9As+lDwsyaxHc5RSkzhIKeqzhlNz/0F0krhp5XCA+V9UqNzCCzOha8FsQ GL1EIqIaZtVzN9ETB0XIWlW9XITUivo= X-MC-Unique: UllLcaWwOUOmXtFk8ZKwkg-1 X-Mimecast-MFC-AGG-ID: UllLcaWwOUOmXtFk8ZKwkg_1760022988 To: devel@lists.libvirt.org Subject: [RFC PATCH 07/16] qemuMonitorJSONGetAllBlockStatsInfo: Directly probe data from 'query-named-block-nodes' Date: Thu, 9 Oct 2025 17:16:07 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: FwkW96Bli-ao67cEIZ3TCp2rtS1fpo8P-flXamDl7XU_1760022988 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: WLJAWOKBLPM26GPCSUAP3F3IDG5ZHPX3 X-Message-ID-Hash: WLJAWOKBLPM26GPCSUAP3F3IDG5ZHPX3 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: 1760023784789116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Currently the data which was probed for statistics from 'query-named-block-nodes' was updated in a separate call in qemuMonitorJSONBlockStatsUpdateCapacityBlockdev. This patch moves and adapts the code so that everything is probed in qemuMonitorJSONGetAllBlockStatsInfo. qemuMonitorJSONBlockStatsUpdateCapacityBlockdev is now an empty function and will be removed later. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_monitor_json.c | 90 ++++++++++++++++++------------------ tests/qemumonitorjsontest.c | 2 + 2 files changed, 47 insertions(+), 45 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 44d7a35874..0aa74e226d 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2524,6 +2524,42 @@ qemuMonitorJSONQueryBlockstats(qemuMonitor *mon, } +static int +qemuMonitorJSONGetOneBlockStatsNamedNodes(size_t pos G_GNUC_UNUSED, + virJSONValue *val, + void *opaque) +{ + GHashTable *stats =3D opaque; + virJSONValue *image; + const char *nodename; + qemuBlockStats *entry; + + if (!(nodename =3D virJSONValueObjectGetString(val, "node-name")) || + !(image =3D virJSONValueObjectGetObject(val, "image"))) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("query-named-block-nodes entry was not in expecte= d format")); + return -1; + } + + if (!(entry =3D virHashLookup(stats, nodename))) { + entry =3D qemuBlockStatsNew(); + g_hash_table_insert(stats, g_strdup(nodename), entry); + } + + /* updating actual size makes sense only when virtual size is present = */ + if (virJSONValueObjectGetNumberUlong(image, "virtual-size", &entry->ca= pacity) =3D=3D 0) { + /* if actual-size is missing, image is not thin provisioned */ + if (virJSONValueObjectGetNumberUlong(image, "actual-size", &entry-= >physical) < 0) + entry->physical =3D entry->capacity; + } + + ignore_value(virJSONValueObjectGetNumberUlong(val, "write_threshold", + &entry->write_threshold)= ); + + return 1; /* we don't want to steal the value from the JSON array */ +} + + int qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable *hash) @@ -2533,6 +2569,7 @@ qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, size_t i; g_autoptr(virJSONValue) blockstatsDevices =3D NULL; g_autoptr(virJSONValue) blockstatsNodes =3D NULL; + g_autoptr(virJSONValue) nodes =3D NULL; if (!(blockstatsDevices =3D qemuMonitorJSONQueryBlockstats(mon, false)= )) return -1; @@ -2580,59 +2617,22 @@ qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mo= n, nstats =3D rc; } - return nstats; -} - - -static int -qemuMonitorJSONBlockStatsUpdateCapacityBlockdevWorker(size_t pos G_GNUC_UN= USED, - virJSONValue *val, - void *opaque) -{ - GHashTable *stats =3D opaque; - virJSONValue *image; - const char *nodename; - qemuBlockStats *entry; - - if (!(nodename =3D virJSONValueObjectGetString(val, "node-name")) || - !(image =3D virJSONValueObjectGetObject(val, "image"))) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("query-named-block-nodes entry was not in expecte= d format")); + if (!(nodes =3D qemuMonitorJSONQueryNamedBlockNodes(mon))) return -1; - } - - if (!(entry =3D virHashLookup(stats, nodename))) { - entry =3D qemuBlockStatsNew(); - g_hash_table_insert(stats, g_strdup(nodename), entry); - } - - /* updating actual size makes sense only when virtual size is present = */ - if (virJSONValueObjectGetNumberUlong(image, "virtual-size", &entry->ca= pacity) =3D=3D 0) { - /* if actual-size is missing, image is not thin provisioned */ - if (virJSONValueObjectGetNumberUlong(image, "actual-size", &entry-= >physical) < 0) - entry->physical =3D entry->capacity; - } - ignore_value(virJSONValueObjectGetNumberUlong(val, "write_threshold", - &entry->write_threshold)= ); + if (virJSONValueArrayForeachSteal(nodes, + qemuMonitorJSONGetOneBlockStatsNamed= Nodes, + hash) < 0) + return -1; - return 1; /* we don't want to steal the value from the JSON array */ + return nstats; } int -qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, - GHashTable *stats) +qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon G_GNUC_UN= USED, + GHashTable *stats G_GNUC_U= NUSED) { - g_autoptr(virJSONValue) nodes =3D NULL; - - if (!(nodes =3D qemuMonitorJSONQueryNamedBlockNodes(mon))) - return -1; - - if (virJSONValueArrayForeachSteal(nodes, - qemuMonitorJSONBlockStatsUpdateCapac= ityBlockdevWorker, - stats) < 0) - return -1; return 0; } diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 7b56a507ea..a229a89860 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -1544,6 +1544,8 @@ testQemuMonitorJSONqemuMonitorJSONGetAllBlockStatsInf= o(const void *opaque) return -1; if (qemuMonitorTestAddItem(test, "query-blockstats", reply) < 0) return -1; + if (qemuMonitorTestAddItem(test, "query-named-block-nodes", "{\"return= \":[]}") < 0) + return -1; #define CHECK0FULL(var, value, varformat, valformat) \ if (stats->var !=3D value) { \ --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760023851; cv=none; d=zohomail.com; s=zohoarc; b=atpJRMMhdTLOeYqrObb+Nkz8tJZHS6ABHaLTCz4K+dIkUeMI0Gqi1g5c1PNy26J4JBpv6WnaUxySKaFL0ZCj8BWyxeWzzwSsWPZOD1xfIhIrkTWvA4cBqEuvMyQRnD7YF8DvJGx3QuxgraE55rhpM87KRYnDR1TRvgFuq3niyr4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760023851; 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=0xPXE7YtQbmhBwbF5Z7Mv8v6YMMWLRlEwB01TqWXDBo=; b=NBmWUl7r/yRe57unGD/iHlf6wCLt6jI8KDvVw2VV0Vd88N7HjxAQ/VlzWZAOSqNYNKc3Oes1lK1TBh7LJ+n2vYCNbl3zxau/Ibe3x9bWwKkQkb4de+OpNx3tcTPALUFZEG+wwejmS7TcyTM/StXvaN5PClfAX++7yei/lr9IZqc= 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 1760023851356287.2944720610951; Thu, 9 Oct 2025 08:30:51 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id EA7744424D; Thu, 9 Oct 2025 11:30:47 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 6E5C144788; Thu, 9 Oct 2025 11:17:22 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id EB89C442E7; Thu, 9 Oct 2025 11:16:44 -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 B6D6143F58 for ; Thu, 9 Oct 2025 11:16:32 -0400 (EDT) Received: from mx-prod-mc-03.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-67-eRCqmTlQN4O96kXQyQ1axw-1; Thu, 09 Oct 2025 11:16:30 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 86DB119560AA for ; Thu, 9 Oct 2025 15:16:29 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id BEA171955F22 for ; Thu, 9 Oct 2025 15:16:28 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022992; 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=0xPXE7YtQbmhBwbF5Z7Mv8v6YMMWLRlEwB01TqWXDBo=; b=Ux2GB6mxkPftQbBxYEi+U6XFt9Tzd9EfMOuaIETYFW0p0lIpJl5lpv/daycIeLzXRbgxdR TiU8kmHEPqMT6gQsK9rNDhkjciSqLqcnU/I6NPGUTUkCN7ufxsI+aZULBV8Kuh9WbZx/GD Rnj7pPUYfQgxGr0uyichX2izIZtc13k= X-MC-Unique: eRCqmTlQN4O96kXQyQ1axw-1 X-Mimecast-MFC-AGG-ID: eRCqmTlQN4O96kXQyQ1axw_1760022989 To: devel@lists.libvirt.org Subject: [RFC PATCH 08/16] Remove qemuMonitorBlockStatsUpdateCapacityBlockdev Date: Thu, 9 Oct 2025 17:16:08 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: TLsBARNob08dHlfOeAqtOtoxy8SidFQfAFps6xTGqcg_1760022989 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: QW3YHGXDVT2WGW54CQSCDWN3SQ34IZET X-Message-ID-Hash: QW3YHGXDVT2WGW54CQSCDWN3SQ34IZET 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: 1760023855619116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Remove the function and address the ripple effect the removal has. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_driver.c | 16 +++------------- src/qemu/qemu_monitor.c | 12 ------------ src/qemu/qemu_monitor.h | 5 ----- src/qemu/qemu_monitor_json.c | 9 --------- src/qemu/qemu_monitor_json.h | 3 --- 5 files changed, 3 insertions(+), 42 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index b6d83f1dc6..806408115f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9597,7 +9597,6 @@ qemuDomainBlockStatsGatherTotals(qemuBlockStats *data, * @driver: driver object * @vm: domain object * @path: to gather the statistics for - * @capacity: refresh capacity of the backing image * @retstats: returns pointer to structure holding the stats * * Gathers the block statistics for use in qemuDomainBlockStats* APIs. @@ -9607,7 +9606,6 @@ qemuDomainBlockStatsGatherTotals(qemuBlockStats *data, static int qemuDomainBlocksStatsGather(virDomainObj *vm, const char *path, - bool capacity, qemuBlockStats **retstats) { qemuDomainObjPrivate *priv =3D vm->privateData; @@ -9644,10 +9642,6 @@ qemuDomainBlocksStatsGather(virDomainObj *vm, qemuDomainObjEnterMonitor(vm); nstats =3D qemuMonitorGetAllBlockStatsInfo(priv->mon, &blockstats); - - if (capacity && nstats >=3D 0) - rc =3D qemuMonitorBlockStatsUpdateCapacityBlockdev(priv->mon, bloc= kstats); - qemuDomainObjExitMonitor(vm); if (nstats < 0 || rc < 0) @@ -9713,7 +9707,7 @@ qemuDomainBlockStats(virDomainPtr dom, if (virDomainObjCheckActive(vm) < 0) goto endjob; - if (qemuDomainBlocksStatsGather(vm, path, false, &blockstats) < 0) + if (qemuDomainBlocksStatsGather(vm, path, &blockstats) < 0) goto endjob; if (VIR_ASSIGN_IS_OVERFLOW(stats->rd_req, blockstats->rd_req) || @@ -9769,8 +9763,7 @@ qemuDomainBlockStatsFlags(virDomainPtr dom, if (virDomainObjCheckActive(vm) < 0) goto endjob; - if ((nstats =3D qemuDomainBlocksStatsGather(vm, path, false, - &blockstats)) < 0) + if ((nstats =3D qemuDomainBlocksStatsGather(vm, path, &blockstats)) < = 0) goto endjob; /* return count of supported stats */ @@ -10603,7 +10596,7 @@ qemuDomainGetBlockInfo(virDomainPtr dom, goto endjob; } - if (qemuDomainBlocksStatsGather(vm, path, true, &entry) < 0) + if (qemuDomainBlocksStatsGather(vm, path, &entry) < 0) goto endjob; if (!entry->wr_highest_offset_valid) { @@ -17724,9 +17717,6 @@ qemuDomainGetStatsBlock(virQEMUDriver *driver, rc =3D qemuMonitorGetAllBlockStatsInfo(priv->mon, &stats); - if (rc >=3D 0) - rc =3D qemuMonitorBlockStatsUpdateCapacityBlockdev(priv->mon, = stats); - qemuDomainObjExitMonitor(dom); /* failure to retrieve stats is fine at this point */ diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index ce6220fbfb..f9b320f765 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -2032,18 +2032,6 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, } -int -qemuMonitorBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, - GHashTable *stats) -{ - VIR_DEBUG("stats=3D%p", stats); - - QEMU_CHECK_MONITOR(mon); - - return qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(mon, stats); -} - - /** * qemuMonitorBlockGetNamedNodeData: * @mon: monitor object diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 4f94edb05f..0555bcbf8e 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -821,11 +821,6 @@ qemuMonitorGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable **ret_stats) ATTRIBUTE_NONNULL(2); -int -qemuMonitorBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, - GHashTable *stats) - ATTRIBUTE_NONNULL(2); - typedef struct _qemuBlockNamedNodeDataBitmap qemuBlockNamedNodeDataBitmap; struct _qemuBlockNamedNodeDataBitmap { char *name; diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 0aa74e226d..e00bc0cf1b 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2629,15 +2629,6 @@ qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, } -int -qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon G_GNUC_UN= USED, - GHashTable *stats G_GNUC_U= NUSED) -{ - - return 0; -} - - static void qemuMonitorJSONBlockNamedNodeDataBitmapFree(qemuBlockNamedNodeDataBitmap *= bitmap) { diff --git a/src/qemu/qemu_monitor_json.h b/src/qemu/qemu_monitor_json.h index 5944aec917..8b06b7599e 100644 --- a/src/qemu/qemu_monitor_json.h +++ b/src/qemu/qemu_monitor_json.h @@ -94,9 +94,6 @@ qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, int qemuMonitorJSONGetAllBlockStatsInfo(qemuMonitor *mon, GHashTable *hash); -int -qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuMonitor *mon, - GHashTable *stats); GHashTable * qemuMonitorJSONBlockGetNamedNodeDataJSON(virJSONValue *nodes); --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760023905; cv=none; d=zohomail.com; s=zohoarc; b=bDnp5akPPj6K296ES+z+YT4Bk2ikat1+FgztVOmGPT15iT9j31msKxR4hD1LoJcXt8Y1kWq37fdSL4N8HWayMRIA14Jvzn0PGMD3m2pCDO3VcOP1o8mieiDI3/WwMnW6wvi1HH4ODK6QLA4OFX850zrRa/jp/ogov2b0fq2qGLc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760023905; 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=w0RalV8Yd+1yg8nGAD+SCRS2sbnuEZY6qVRzEd+LZbc=; b=kKaOSrsHh8vKD0G6/9alDZErwuVP/b2kyjbPcIX/0bWcOxjLNhpV3mHVHTdg5IW5IQ/1SuFOp2O4HxxK6lHSJ/OR9CgpGzR0FCXtSyDGv96Q2BFH6rDugTrsRP62rXJKaFe/6kXdi2aVeOTDb6KhuEHD8FSKbEgVDY9TfnlWyaQ= 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 1760023905616937.9183676243226; Thu, 9 Oct 2025 08:31:45 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 8BD2F418CE; Thu, 9 Oct 2025 11:31:42 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id DEC6C44824; Thu, 9 Oct 2025 11:17:26 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 5974843F79; Thu, 9 Oct 2025 11:16:45 -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 125A643F61 for ; Thu, 9 Oct 2025 11:16:32 -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-222-8rW9GmptMQqtMUZtoWVISQ-1; Thu, 09 Oct 2025 11:16:31 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 C65EF1954B0B for ; Thu, 9 Oct 2025 15:16:30 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0A9D21955F22 for ; Thu, 9 Oct 2025 15:16:29 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022992; 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=w0RalV8Yd+1yg8nGAD+SCRS2sbnuEZY6qVRzEd+LZbc=; b=UPXccRPXgK4ZL8LdS5uKVQtC8rJlhEKBNADJAJTRADTkjXui0jJf8enHEpIR9HLH8/ZsXB iMs5h/qlNXfh4LfmDgVMjXiuDTYGihrWe5FP8sb1wzGzhVIV5BCG1fftC10CEN+QDLNf62 k+xYj0WrKBxMRb4eJMc7zy8r48WaNe0= X-MC-Unique: 8rW9GmptMQqtMUZtoWVISQ-1 X-Mimecast-MFC-AGG-ID: 8rW9GmptMQqtMUZtoWVISQ_1760022990 To: devel@lists.libvirt.org Subject: [RFC PATCH 09/16] qemu: monitor: Extract block limit values Date: Thu, 9 Oct 2025 17:16:09 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: fd0_qNCzC9qwhGiT2a1p0qmjtYvRHU4NCX38tAw81_U_1760022990 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: GRBY25SM22V7JKIDDZSISCWB4XMVR7ZT X-Message-ID-Hash: GRBY25SM22V7JKIDDZSISCWB4XMVR7ZT 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: 1760023908692116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The 'limits' field reports various maximum request sizes and alignments for a qemu blockdev protocol node. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 2 ++ src/qemu/qemu_monitor.h | 19 +++++++++++++++++++ src/qemu/qemu_monitor_json.c | 31 +++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index f9b320f765..554898b93f 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1983,6 +1983,8 @@ qemuBlockStatsFinalize(GObject *object) if (!stats) return; + g_free(stats->limits); + G_OBJECT_CLASS(qemu_block_stats_parent_class)->finalize(object); } diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 0555bcbf8e..9b9292e48d 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -789,6 +789,23 @@ qemuMonitorBlockIOStatusToError(const char *status); GHashTable * qemuMonitorGetBlockInfo(qemuMonitor *mon); + +struct qemuBlockStatsLimits { + unsigned long long request_alignment; + unsigned long long discard_max; + unsigned long long discard_alignment; + unsigned long long write_zeroes_max; + unsigned long long write_zeroes_alignment; + unsigned long long transfer_optimal; + unsigned long long transfer_max; + unsigned long long transfer_hw_max; + unsigned long long iov_max; + unsigned long long iov_hw_max; + unsigned long long memory_alignment_minimal; + unsigned long long memory_alignment_optimal; +}; + + struct _qemuBlockStats { GObject parent; @@ -810,6 +827,8 @@ struct _qemuBlockStats { /* write_threshold is valid only if it's non-zero, conforming to qemu = semantics */ unsigned long long write_threshold; + + struct qemuBlockStatsLimits *limits; }; G_DECLARE_FINAL_TYPE(qemuBlockStats, qemu_block_stats, QEMU, BLOCK_STATS, = GObject); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index e00bc0cf1b..cf63f43318 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2524,6 +2524,33 @@ qemuMonitorJSONQueryBlockstats(qemuMonitor *mon, } +static struct qemuBlockStatsLimits * +qemuMonitorJSONBlockStatsCollectLimits(virJSONValue *limits_json) +{ + struct qemuBlockStatsLimits *limits =3D g_new0(struct qemuBlockStatsLi= mits, 1); + + virJSONValueObjectGetNumberUlong(limits_json, "request-alignment", &li= mits->request_alignment); + + virJSONValueObjectGetNumberUlong(limits_json, "max-discard", &limits->= discard_max); + virJSONValueObjectGetNumberUlong(limits_json, "discard-alignment", &li= mits->discard_alignment); + + virJSONValueObjectGetNumberUlong(limits_json, "max-write-zeroes", &lim= its->write_zeroes_max); + virJSONValueObjectGetNumberUlong(limits_json, "write-zeroes-alignment"= , &limits->write_zeroes_alignment); + + virJSONValueObjectGetNumberUlong(limits_json, "opt-transfer", &limits-= >transfer_optimal); + virJSONValueObjectGetNumberUlong(limits_json, "max-transfer", &limits-= >transfer_max); + virJSONValueObjectGetNumberUlong(limits_json, "max-hw-transfer", &limi= ts->transfer_hw_max); + + virJSONValueObjectGetNumberUlong(limits_json, "max-iov", &limits->iov_= max); + virJSONValueObjectGetNumberUlong(limits_json, "max-hw-iov", &limits->i= ov_hw_max); + + virJSONValueObjectGetNumberUlong(limits_json, "min-mem-alignment", &li= mits->memory_alignment_minimal); + virJSONValueObjectGetNumberUlong(limits_json, "opt-mem-alignment", &li= mits->memory_alignment_optimal); + + return limits; +} + + static int qemuMonitorJSONGetOneBlockStatsNamedNodes(size_t pos G_GNUC_UNUSED, virJSONValue *val, @@ -2531,6 +2558,7 @@ qemuMonitorJSONGetOneBlockStatsNamedNodes(size_t pos = G_GNUC_UNUSED, { GHashTable *stats =3D opaque; virJSONValue *image; + virJSONValue *limits; const char *nodename; qemuBlockStats *entry; @@ -2556,6 +2584,9 @@ qemuMonitorJSONGetOneBlockStatsNamedNodes(size_t pos = G_GNUC_UNUSED, ignore_value(virJSONValueObjectGetNumberUlong(val, "write_threshold", &entry->write_threshold)= ); + if ((limits =3D virJSONValueObjectGetObject(image, "limits"))) + entry->limits =3D qemuMonitorJSONBlockStatsCollectLimits(limits); + return 1; /* we don't want to steal the value from the JSON array */ } --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760024088; cv=none; d=zohomail.com; s=zohoarc; b=JFSSJQXJXRCEuzRM0IvRuJnCiSzSZlfgssh/BpfFklbJG3k7IflIJWIIKEOiVck4S+cO2aMftmu88yT/v+aI9Q/exoHZPw72bECdqzs1fIgfacG1pP3xfB03rgwECqyT2Z3yGaPaLTg4mNu5xdTRrSunallthTDz+CSuAPxNUWE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760024088; 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=gVyd7VfdrHTOngF6kl7kXZ2olHFk/EY2tasO8z4nqUw=; b=jkrPbLUp909/herNpN002q2OgJzhUoc/NXqkcg25okWafrffkiG94WfIzjdwR+MT+1lgc/L7Hkc7UPqUa8orDdrqopuDNmfQRdlMFtpxVM6oChsPcvPVfIGYJfXj2bBuGT2Em1lx3nwmQcQsRaqZKjIUXzpD5O4npqDMrrjDoW0= 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 1760024088150488.821612298166; Thu, 9 Oct 2025 08:34:48 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 4DA01440ED; Thu, 9 Oct 2025 11:34:47 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id C055043ECB; Thu, 9 Oct 2025 11:17:34 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id C3A68444CD; Thu, 9 Oct 2025 11:17:07 -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 DB2D34404C for ; Thu, 9 Oct 2025 11:16:35 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-427-kjxSy2amNhif5ti85QULWw-1; Thu, 09 Oct 2025 11:16:32 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2F22B1800292 for ; Thu, 9 Oct 2025 15:16:32 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 479601954128 for ; Thu, 9 Oct 2025 15:16:31 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022995; 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=gVyd7VfdrHTOngF6kl7kXZ2olHFk/EY2tasO8z4nqUw=; b=Muniz7uP4VsBGjCv+rcbjdmaDBdmtbVf8FNpdgv4G/2KEeFpe3qYRHTbL0AA1hTK6wzsLv vP4ZBGVAWXfgao/HMw1IrkFf3mwU347ezDkqcKVlTLqxDBQOjwlU264MGTLI70w5bSghiG zHV2llBaoAK4axDCDceGNgZDG1bxUFY= X-MC-Unique: kjxSy2amNhif5ti85QULWw-1 X-Mimecast-MFC-AGG-ID: kjxSy2amNhif5ti85QULWw_1760022992 To: devel@lists.libvirt.org Subject: [RFC PATCH 10/16] Expose qemu storage request limits via bulk stats API Date: Thu, 9 Oct 2025 17:16:10 +0200 Message-ID: <30eaba5683b20ddc0b77ab3ff7002ca2f79df563.1760022633.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: oVC-z_n8uylZUF-JEvXb9UlFpze__qOYmgc1XwDHwsc_1760022992 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JCCIU75ORCRC5V3VEUDMPKOHF3QRZYHS X-Message-ID-Hash: JCCIU75ORCRC5V3VEUDMPKOHF3QRZYHS 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: 1760024090625154100 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Management applications can use the detected limits to cross reference with configuration within the VM to ensure optimal performance. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- docs/manpages/virsh.rst | 21 +++++ include/libvirt/libvirt-domain.h | 148 +++++++++++++++++++++++++++++++ src/qemu/qemu_driver.c | 61 +++++++++++++ 3 files changed, 230 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index bcb5495ed9..5b4eb236a4 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2751,6 +2751,27 @@ Information listed includes: * ``block..physical`` - physical size of source file in bytes * ``block..threshold`` - threshold (in bytes) for delivering the VIR_DOMAIN_EVENT_ID_BLOCK_THRESHOLD event. See domblkthreshold. +* ``block..limits.request_alignment`` - Alignment requirement for req= uests + in bytes +* ``block..limits.discard_max`` - Maximum number of bytes that can be + discarded at once +* ``block..limits.discard_alignment`` - Optimal alignment for discard + requests in bytes +* ``block..limits.write_zeroes_max`` - Maximum number of bytes that c= an be + zeroed out at once +* ``block..limits.write_zeroes_alignment`` - Optimal alignment for + write_zeroes requests in bytes +* ``block..limits.transfer_optimal`` - Optimal transfer length in byt= es +* ``block..limits.transfer_max`` - Maximal transfer length in bytes +* ``block..limits.transfer_hw_max`` - Maximal hardware transfer lengt= h of + requests bypassing kernel IO scheduler in bytes +* ``block..limits.iov_max`` - Maximum number of scatter/gather elemen= ts +* ``block..limits.iov_hw_max`` - Maximal number of scatter/gather ele= ments + of requests bypassing kernel IO scheduler +* ``block..limits.memory_alignment_minimal`` - memory alignment in by= tes so + that no bounce buffer is needed +* ``block..limits.memory_alignment_optimal`` - memory alignment in by= tes + that is used for bounce buffers *--iothread* returns information about IOThreads on the running guest diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 71bb49fe6c..90c37a575c 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -3488,6 +3488,154 @@ struct _virDomainStatsRecord { */ # define VIR_DOMAIN_STATS_BLOCK_SUFFIX_THRESHOLD ".threshold" +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_REQUEST_ALIGNMENT: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Alignment requirement, in bytes, for offset/length of I/O requests, as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_REQUEST_ALIGNMENT ".limits.r= equest_alignment" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_DISCARD_MAX: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Maximum number of bytes that can be discarded at once, as unsigned long= long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_DISCARD_MAX ".limits.discard= _max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_DISCARD_ALIGNMENT: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Optimal alignment for discard requests in bytes, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_DISCARD_ALIGNMENT ".limits.d= iscard_alignment" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_WRITE_ZEROES_MAX: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Maximum number of bytes that can be zeroed out at once, as unsigned lon= g long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_WRITE_ZEROES_MAX ".limits.wr= ite_zeroes_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_WRITE_ZEROES_ALIGNMENT: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Optimal alignment for write_zeroes requests in bytes, as unsigned long = long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_WRITE_ZEROES_ALIGNMENT ".lim= its.write_zeroes_alignment" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_OPTIMAL: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Optimal transfer length in bytes, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_OPTIMAL ".limits.tr= ansfer_optimal" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_MAX: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Maximal transfer length in bytes, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_MAX ".limits.transf= er_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_HW_MAX: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Maximal hardware transfer length of requests bypassing kernel IO schedu= ler + * in bytes, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_HW_MAX ".limits.tra= nsfer_hw_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_IOV_MAX: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Maximum number of scatter/gather elements, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_IOV_MAX ".limits.iov_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_IOV_HW_MAX: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * Maximal number of scatter/gather elements of requests bypassing kernel = IO + * scheduler, as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_IOV_HW_MAX ".limits.iov_hw_m= ax" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_MINIMAL: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * memory alignment in bytes so that no bounce buffer is needed, as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_MINIMAL ".l= imits.memory_alignment_minimal" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_OPTIMAL: + * + * limits represent constraints on individual operations as imposed by the + * backing file storage technology. + * + * memory alignment in bytes that is used for bounce buffers, as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_OPTIMAL ".l= imits.memory_alignment_optimal" /** * VIR_DOMAIN_STATS_PERF_CMT: diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 806408115f..4e5e2fed0f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17510,6 +17510,67 @@ qemuDomainGetStatsBlockExportBackendStorage(const = char *entryname, if (entry->write_threshold) virTypedParamListAddULLong(params, entry->write_threshold, VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR= _DOMAIN_STATS_BLOCK_SUFFIX_THRESHOLD, recordnr); + + if (entry->limits) { + if (entry->limits->request_alignment > 0) + virTypedParamListAddULLong(params, entry->limits->request_alig= nment, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu"= VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_REQUEST_ALIGNMENT, + recordnr); + + if (entry->limits->discard_max > 0) + virTypedParamListAddULLong(params, entry->limits->discard_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu"= VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_DISCARD_MAX, + recordnr); + + if (entry->limits->discard_alignment > 0) + virTypedParamListAddULLong(params, entry->limits->discard_alig= nment, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu"= VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_DISCARD_ALIGNMENT, + recordnr); + + if (entry->limits->write_zeroes_max > 0) + virTypedParamListAddULLong(params, entry->limits->write_zeroes= _max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu"= VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_WRITE_ZEROES_MAX, + recordnr); + if (entry->limits->write_zeroes_alignment > 0) + virTypedParamListAddULLong(params, entry->limits->write_zeroes= _alignment, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu"= VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_WRITE_ZEROES_ALIGNMENT, + recordnr); + + if (entry->limits->transfer_optimal > 0) + virTypedParamListAddULLong(params, entry->limits->transfer_opt= imal, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu"= VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_OPTIMAL, + recordnr); + + if (entry->limits->transfer_max > 0) + virTypedParamListAddULLong(params, entry->limits->transfer_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu"= VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_MAX, + recordnr); + + if (entry->limits->transfer_hw_max > 0) + virTypedParamListAddULLong(params, entry->limits->transfer_hw_= max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu"= VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_TRANSFER_HW_MAX, + recordnr); + + if (entry->limits->iov_max > 0) + virTypedParamListAddULLong(params, entry->limits->iov_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu"= VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_IOV_MAX, + recordnr); + + if (entry->limits->iov_hw_max > 0) + virTypedParamListAddULLong(params, entry->limits->iov_hw_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu"= VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_IOV_HW_MAX, + recordnr); + + if (entry->limits->memory_alignment_minimal > 0) + virTypedParamListAddULLong(params, entry->limits->memory_align= ment_minimal, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu"= VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_MINIMAL, + recordnr); + + if (entry->limits->memory_alignment_optimal > 0) + virTypedParamListAddULLong(params, entry->limits->memory_align= ment_optimal, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu"= VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_OPTIMAL, + recordnr); + } } --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760023987; cv=none; d=zohomail.com; s=zohoarc; b=cNmK1OAq1G2pmjtI8LBz6eibHLBK9c2ZJ3tBjsi0r6uhUC/Y5mnzKV5lOoAA/dllxkAsewoNuqDnPA/S2cbu29q6tkfrme7vfWax8YRhE2qEmPkxTCDXDncM0Abo2k+9JpIjLJF5Y9JrKFeii4QWIpP2T9pRE81vNIcs0GxqWxs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760023987; 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=trwvL4nGEtmBna9VwBd4z3WqbdBNWP79OBAFXgvvvYE=; b=U0DlgtSV8KqMI0c4IAJHeB9tzaDKZUc4jrNk5Zv1tnNvzZrpg9R1UEaO+u9ogNIAKvFIPoyNPSPDAjBzzLOaABp/Mnqr9BHBtKhZMb6Lzxlpl/Ik3fA3I6KDyRvKGMDGJR21l4UzRPk8fCNteEL78wO0r3zCbzeZIVMidqHxgks= 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 1760023987698680.8151970412173; Thu, 9 Oct 2025 08:33:07 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 069C8443A0; Thu, 9 Oct 2025 11:33:06 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 579E244890; Thu, 9 Oct 2025 11:17:30 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 5261B444CD; Thu, 9 Oct 2025 11:17:07 -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 E1A01440A3 for ; Thu, 9 Oct 2025 11:16:35 -0400 (EDT) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-507-FU3xyp8CPbiSlWw0sCPwIA-1; Thu, 09 Oct 2025 11:16:34 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4C6531800290 for ; Thu, 9 Oct 2025 15:16:33 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 84CA51955F22 for ; Thu, 9 Oct 2025 15:16:32 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022995; 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=trwvL4nGEtmBna9VwBd4z3WqbdBNWP79OBAFXgvvvYE=; b=bYT9K0eICv+XIxpgS0fWT38S/8r5a1IGvE7KBCf1uuBph3Wb6tVaUbDu8GOFwhvDCt46R+ fYWtgU19HwMYESNTwjyYjHgne3JmaIbBO48JLFC7FYiGAq/tJ8sHV9pn8O0SC5n85EBhJ8 sQFgLXJIv/51YEHjyj2etL1F3Z4HMiQ= X-MC-Unique: FU3xyp8CPbiSlWw0sCPwIA-1 X-Mimecast-MFC-AGG-ID: FU3xyp8CPbiSlWw0sCPwIA_1760022993 To: devel@lists.libvirt.org Subject: [RFC PATCH 11/16] qemu_monitor: Extract 'timed_stats' of block devices Date: Thu, 9 Oct 2025 17:16:11 +0200 Message-ID: <55d92ab5b501720fdf8e0421bf6a2b916c13c881.1760022633.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: j3zctlt3XefQHDUzsIJjDLYmEw1Hx6BWZwXXUCnKkNw_1760022993 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: H7ADRWNNJSKM23STV62S5BFIRCD4XXGA X-Message-ID-Hash: H7ADRWNNJSKM23STV62S5BFIRCD4XXGA 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: 1760023989408154100 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The 'timed_stats' block is a set of statistics gathered in configurable time intervals. The stats include latency timings of reads/writes as well as the depth of the request queues. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_monitor.c | 1 + src/qemu/qemu_monitor.h | 29 ++++++++++++++++++++++++ src/qemu/qemu_monitor_json.c | 44 ++++++++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index 554898b93f..fb01335f89 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -1984,6 +1984,7 @@ qemuBlockStatsFinalize(GObject *object) return; g_free(stats->limits); + g_free(stats->timed_stats); G_OBJECT_CLASS(qemu_block_stats_parent_class)->finalize(object); } diff --git a/src/qemu/qemu_monitor.h b/src/qemu/qemu_monitor.h index 9b9292e48d..a93d722418 100644 --- a/src/qemu/qemu_monitor.h +++ b/src/qemu/qemu_monitor.h @@ -806,6 +806,31 @@ struct qemuBlockStatsLimits { }; +struct qemuBlockStatsTimed { + unsigned long long interval_length; + + /* latencies are in nanoseconds */ + unsigned long long rd_latency_min; + unsigned long long rd_latency_max; + unsigned long long rd_latency_avg; + + unsigned long long wr_latency_min; + unsigned long long wr_latency_max; + unsigned long long wr_latency_avg; + + unsigned long long zone_append_latency_min; + unsigned long long zone_append_latency_max; + unsigned long long zone_append_latency_avg; + + unsigned long long flush_latency_min; + unsigned long long flush_latency_max; + unsigned long long flush_latency_avg; + + double rd_queue_depth_avg; + double wr_queue_depth_avg; + double zone_append_queue_depth_avg; +}; + struct _qemuBlockStats { GObject parent; @@ -829,6 +854,10 @@ struct _qemuBlockStats { unsigned long long write_threshold; struct qemuBlockStatsLimits *limits; + + /* block accounting/timed stats from qemu - one entry per interval con= figured */ + size_t n_timed_stats; + struct qemuBlockStatsTimed *timed_stats; }; G_DECLARE_FINAL_TYPE(qemuBlockStats, qemu_block_stats, QEMU, BLOCK_STATS, = GObject); diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index cf63f43318..0cb20d4387 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2386,6 +2386,45 @@ qemuMonitorJSONGetBlockInfo(qemuMonitor *mon, } +static void +qemuMonitorJSONBlockStatsCollectDataTimedOne(virJSONValue *j, + struct qemuBlockStatsTimed *s) +{ + virJSONValueObjectGetNumberUlong(j, "interval_length", &s->interval_le= ngth); + + virJSONValueObjectGetNumberUlong(j, "min_rd_latency_ns", &s->rd_latenc= y_min); + virJSONValueObjectGetNumberUlong(j, "max_rd_latency_ns", &s->rd_latenc= y_max); + virJSONValueObjectGetNumberUlong(j, "avg_rd_latency_ns", &s->rd_latenc= y_avg); + + virJSONValueObjectGetNumberUlong(j, "min_wr_latency_ns", &s->wr_latenc= y_min); + virJSONValueObjectGetNumberUlong(j, "max_wr_latency_ns", &s->wr_latenc= y_max); + virJSONValueObjectGetNumberUlong(j, "avg_wr_latency_ns", &s->wr_latenc= y_avg); + + virJSONValueObjectGetNumberUlong(j, "min_zone_append_latency_ns", &s->= zone_append_latency_min); + virJSONValueObjectGetNumberUlong(j, "max_zone_append_latency_ns", &s->= zone_append_latency_max); + virJSONValueObjectGetNumberUlong(j, "avg_zone_append_latency_ns", &s->= zone_append_latency_avg); + + virJSONValueObjectGetNumberDouble(j, "avg_rd_queue_depth", &s->rd_queu= e_depth_avg); + virJSONValueObjectGetNumberDouble(j, "avg_wr_queue_depth", &s->wr_queu= e_depth_avg); + virJSONValueObjectGetNumberDouble(j, "avg_zone_append_queue_depth", &s= ->zone_append_queue_depth_avg); +} + + +static void +qemuMonitorJSONBlockStatsCollectDataTimed(virJSONValue *timed_stats, + qemuBlockStats *bstats) +{ + size_t i; + + bstats->n_timed_stats =3D virJSONValueArraySize(timed_stats); + bstats->timed_stats =3D g_new0(struct qemuBlockStatsTimed, bstats->n_t= imed_stats); + + for (i =3D 0; i < bstats->n_timed_stats; i++) + qemuMonitorJSONBlockStatsCollectDataTimedOne(virJSONValueArrayGet(= timed_stats, i), + bstats->timed_stats += i); +} + + static qemuBlockStats * qemuMonitorJSONBlockStatsCollectData(virJSONValue *dev, int *nstats) @@ -2394,6 +2433,7 @@ qemuMonitorJSONBlockStatsCollectData(virJSONValue *de= v, virJSONValue *parent; virJSONValue *parentstats; virJSONValue *stats; + virJSONValue *timed_stats; if ((stats =3D virJSONValueObjectGetObject(dev, "stats")) =3D=3D NULL)= { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", @@ -2429,6 +2469,10 @@ qemuMonitorJSONBlockStatsCollectData(virJSONValue *d= ev, bstats->wr_highest_offset_valid =3D true; } + if ((timed_stats =3D virJSONValueObjectGetArray(stats, "timed_stats"))= && + virJSONValueArraySize(timed_stats) > 0) + qemuMonitorJSONBlockStatsCollectDataTimed(timed_stats, bstats); + return g_steal_pointer(&bstats); } --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760024240; cv=none; d=zohomail.com; s=zohoarc; b=NiT/sHC+u0lcufE/G8nEOJes/pUxunbW0yRUK2j2ZZlbvdualQBENyWwpRpADPhPsSEf78xWX2Dxf53gvNvK5arpCPwDejqI1ShGvPcxFz+0KLvL6XlbNRmFCkHD7CVaQKvk0w5HCuQ+EUTXhT75SFCHtVe7UjJoBPwvHESrJ9w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760024240; 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=vm67iEZUsSydkmRrciFdoDQyus2FAWDY+4K6uqhoBsQ=; b=UWd6SY9Db3QLA0mIfXjkTzrVX3GzXAi1Px2pzAJ7Xx5s+PTm9arjgW2aUYq34qQH98IuwBdSVmJ46cMrYODGa+WaaY+VA+lYAF9GaAenrWQ41uoMxKi7gKPjlXNSYhLRKAjj2Rgr05HT/KJALH/hpqR4Z9/gUMrOILmvqdJP6Dk= 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 1760024240759793.6425775520244; Thu, 9 Oct 2025 08:37:20 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 23563442D8; Thu, 9 Oct 2025 11:37:20 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id A4A5A4424F; Thu, 9 Oct 2025 11:17:44 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 472934476C; Thu, 9 Oct 2025 11:17:38 -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 5D09443F27 for ; Thu, 9 Oct 2025 11:16:38 -0400 (EDT) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-508-YDFDVDIBODqS7OCVIqrdJA-1; Thu, 09 Oct 2025 11:16:35 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 890D81800562 for ; Thu, 9 Oct 2025 15:16:34 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C0C481955F22 for ; Thu, 9 Oct 2025 15:16:33 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022998; 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=vm67iEZUsSydkmRrciFdoDQyus2FAWDY+4K6uqhoBsQ=; b=gu1qc/+U6hdGn3tTqEHyhlJ9Hu9Gi7O0K69fBG/ec8y+fihGvuptEx5QFB1vH/6437jitX mGGkI06esrHKKeyPS9pN5p71MQ45BfSPqcBe2MACC+NovG0GdlxdQ0SeUaIWQ19U0TVQH3 zo+n0vwvG2NoD5ZRUe8PjvD0z8/tPus= X-MC-Unique: YDFDVDIBODqS7OCVIqrdJA-1 X-Mimecast-MFC-AGG-ID: YDFDVDIBODqS7OCVIqrdJA_1760022994 To: devel@lists.libvirt.org Subject: [RFC PATCH 12/16] Expose qemu timed block statistics via bulk stats API Date: Thu, 9 Oct 2025 17:16:12 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: HVa6suehPNZpNOZ6wXeP9a3-8yJSxiE7vnBPQDqibjc_1760022994 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: V5KSR3MNQXD6ZYVBCE4ZWWAVRI336H5P X-Message-ID-Hash: V5KSR3MNQXD6ZYVBCE4ZWWAVRI336H5P 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: 1760024242358154100 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The statistics show various disk access timing parameters collected in configurable interval which can be useful for performance investigations. Note that the statistic collection needs to be enabled explicitly for the statistics to be collected and displayed. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- docs/manpages/virsh.rst | 33 ++++++ include/libvirt/libvirt-domain.h | 178 +++++++++++++++++++++++++++++++ src/qemu/qemu_driver.c | 94 ++++++++++++++++ 3 files changed, 305 insertions(+) diff --git a/docs/manpages/virsh.rst b/docs/manpages/virsh.rst index 5b4eb236a4..73263ffc7f 100644 --- a/docs/manpages/virsh.rst +++ b/docs/manpages/virsh.rst @@ -2772,6 +2772,39 @@ Information listed includes: that no bounce buffer is needed * ``block..limits.memory_alignment_optimal`` - memory alignment in by= tes that is used for bounce buffers +* ``block..timed_group.count`` - number of blocks of timed group stat= istics +* ``block..timed_group..interval_length`` - The time interval in + seconds for which the statistics in this group were collected. +* ``block..timed_group..rd_latency_min`` - minimum latency of re= ad + operations in the defined interval in nanoseconds +* ``block..timed_group..rd_latency_max`` - maximum latency of re= ad + operations in the defined interval in nanoseconds +* ``block..timed_group..rd_latency_avg`` - average latency of re= ad + operations in the defined interval in nanoseconds +* ``block..timed_group..wr_latency_min`` - minimum latency of wr= ite + operations in the defined interval in nanoseconds +* ``block..timed_group..wr_latency_max`` - maximum latency of wr= ite + operations in the defined interval in nanoseconds +* ``block..timed_group..wr_latency_avg`` - average latency of wr= ite + operations in the defined interval in nanoseconds +* ``block..timed_group..zone_append_latency_min`` - minimum late= ncy + of zone append operations in the defined interval in nanoseconds +* ``block..timed_group..zone_append_latency_max`` - maximum late= ncy + of zone append operations in the defined interval in nanoseconds +* ``block..timed_group..zone_append_latency_avg`` - average late= ncy + of zone append operations in the defined interval in nanoseconds +* ``block..timed_group..flush_latency_min`` - minimum latency + of flush operations in the defined interval in nanoseconds +* ``block..timed_group..flush_latency_max`` - maximum latency of= flush + operations in the defined interval in nanoseconds +* ``block..timed_group..flush_latency_avg`` - average latency of= flush + operations in the defined interval in nanoseconds +* ``block..timed_group..rd_queue_depth_avg`` - average number of + pending read operations in the defined interval +* ``block..timed_group..wr_queue_depth_avg`` - average number of + pending write operations in the defined interval +* ``block..timed_group..zone_append_queue_depth_avg`` - average = number + of pending zone append operations in the defined interval *--iothread* returns information about IOThreads on the running guest diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-dom= ain.h index 90c37a575c..56bd085ef5 100644 --- a/include/libvirt/libvirt-domain.h +++ b/include/libvirt/libvirt-domain.h @@ -3637,6 +3637,184 @@ struct _virDomainStatsRecord { */ # define VIR_DOMAIN_STATS_BLOCK_SUFFIX_LIMITS_MEMORY_ALIGNMENT_OPTIMAL ".l= imits.memory_alignment_optimal" +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_COUNT: + * + * Number of groups of statistics accounted in a configured time intervals= as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_COUNT ".timed_group.cou= nt" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX: + * + * The parameter name prefix to access each group of timed stats. Concaten= ate the + * prefix, the entry number formatted as an unsigned integer and one of the + * timed group suffix parameters to form a complete paramter name. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_PREFIX ".timed_group." + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_INTERVAL: + * + * The time interval in seconds as unsigned long long for which the statis= tics + * in this group were collected. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_INTERVAL ".inter= val" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_MIN: + * + * Minimum latency of read operations in the defined interval, in nanoseco= nds as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_MIN "= .rd_latency_min" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_MAX: + * + * Maximum latency of read operations in the defined interval, in nanoseco= nds as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_MAX "= .rd_latency_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_AVG: + * + * Average latency of read operations in the defined interval, in nanoseco= nds as + * unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_LATENCY_AVG "= .rd_latency_avg" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_MIN: + * + * Minimum latency of write operations in the defined interval, in nanosec= onds + * as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_MIN "= .wr_latency_min" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_MAX: + * + * Maximum latency of write operations in the defined interval, in nanosec= onds + * as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_MAX "= .wr_latency_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_AVG: + * + * Average latency of write operations in the defined interval, in nanosec= onds + * as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_LATENCY_AVG "= .wr_latency_avg" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATENCY_MI= N: + * Minimum latency of zone append operations in the defined interval, in + * nanoseconds as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATE= NCY_MIN ".zone_append_latency_min" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATENCY_MA= X: + * + * Maximum latency of zone append operations in the defined interval, in + * nanoseconds as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATE= NCY_MAX ".zone_append_latency_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATENCY_AV= G: + * + * Average latency of zone append operations in the defined interval, in + * nanoseconds as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_LATE= NCY_AVG ".zone_append_latency_avg" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_MIN: + * + * Minimum latency of flush operations in the defined interval, in nanosec= onds + * as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_MI= N ".flush_latency_min" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_MAX: + * + * Maximum latency of flush operations in the defined interval, in nanosec= onds + * as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_MA= X ".flush_latency_max" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_AVG: + * + * Average latency of flush operations in the defined interval, in nanosec= onds + * as unsigned long long. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_FLUSH_LATENCY_AV= G ".flush_latency_avg" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_QUEUE_DEPTH_AVG: + * + * Average number of pending read operations in the defined interval as do= uble. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_RD_QUEUE_DEPTH_A= VG ".rd_queue_depth_avg" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_QUEUE_DEPTH_AVG: + * + * Average number of pending write operations in the defined interval as d= ouble. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_WR_QUEUE_DEPTH_A= VG ".wr_queue_depth_avg" + +/** + * VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_QUEUE_DEPT= H_AVG: + * + * Average number of pending zone append operations in the defined interva= l as + * double. + * + * Since: 11.9.0 + */ +# define VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_SUFFIX_ZONE_APPEND_QUEU= E_DEPTH_AVG ".zone_append_queue_depth_avg" + /** * VIR_DOMAIN_STATS_PERF_CMT: * diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 4e5e2fed0f..b8157bd3fe 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -17581,6 +17581,7 @@ qemuDomainGetStatsBlockExportFrontend(const char *f= rontendname, virTypedParamList *par) { qemuBlockStats *en; + size_t i; /* In case where qemu didn't provide the stats we stop here rather than * trying to refresh the stats from the disk. Inability to provide sta= ts is @@ -17604,6 +17605,99 @@ qemuDomainGetStatsBlockExportFrontend(const char *= frontendname, VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOM= AIN_STATS_BLOCK_SUFFIX_FL_REQS, idx); virTypedParamListAddULLong(par, en->flush_total_times, VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR_DOM= AIN_STATS_BLOCK_SUFFIX_FL_TIMES, idx); + + if (en->n_timed_stats > 0) { + virTypedParamListAddULLong(par, en->n_timed_stats, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" VIR= _DOMAIN_STATS_BLOCK_SUFFIX_TIMED_GROUP_COUNT, idx); + + for (i =3D 0; i < en->n_timed_stats; i++) { + virTypedParamListAddULLong(par, en->timed_stats[i].interval_le= ngth, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_INTERVAL, + idx, i); + + virTypedParamListAddULLong(par, en->timed_stats[i].rd_latency_= min, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_RD_LATENCY_MIN, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].rd_latency_= max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_RD_LATENCY_MAX, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].rd_latency_= avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_RD_LATENCY_AVG, + idx, i); + + virTypedParamListAddULLong(par, en->timed_stats[i].wr_latency_= min, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_WR_LATENCY_MIN, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].wr_latency_= max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_WR_LATENCY_MAX, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].wr_latency_= avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_WR_LATENCY_AVG, + idx, i); + + virTypedParamListAddULLong(par, en->timed_stats[i].zone_append= _latency_min, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_ZONE_APPEND_LATENCY_MIN, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].zone_append= _latency_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_ZONE_APPEND_LATENCY_MAX, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].zone_append= _latency_avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_ZONE_APPEND_LATENCY_AVG, + idx, i); + + virTypedParamListAddULLong(par, en->timed_stats[i].flush_laten= cy_min, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_FLUSH_LATENCY_MIN, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].flush_laten= cy_max, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_FLUSH_LATENCY_MAX, + idx, i); + virTypedParamListAddULLong(par, en->timed_stats[i].flush_laten= cy_avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_FLUSH_LATENCY_AVG, + idx, i); + + virTypedParamListAddDouble(par, en->timed_stats[i].rd_queue_de= pth_avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_RD_QUEUE_DEPTH_AVG, + idx, i); + virTypedParamListAddDouble(par, en->timed_stats[i].wr_queue_de= pth_avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_WR_QUEUE_DEPTH_AVG, + idx, i); + virTypedParamListAddDouble(par, en->timed_stats[i].zone_append= _queue_depth_avg, + VIR_DOMAIN_STATS_BLOCK_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_PREFIX "%zu" + VIR_DOMAIN_STATS_BLOCK_SUFFIX_TIMED= _GROUP_SUFFIX_ZONE_APPEND_QUEUE_DEPTH_AVG, + idx, i); + } + } } --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760024442; cv=none; d=zohomail.com; s=zohoarc; b=TGIZrg0v3EnpPvuUrw5y8hKRe1Cd62QAyEIAthghtvNS0JMo+WNeIiSjFpncb0Z/KFzblU332pQYJeV6jo/WOR0gfs3jjXublKAOT9+W0z5KRgZZJIjSaa8gp8ZQlB8HthfKI/S6+9Ri6eSf4bEw0S/sSoRFj3AxNeS6PSGnDg8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760024442; 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=uYDgK3EshMfnB0DN9gzXroSm7Ti73vOCGL1LvDsvf6I=; b=QPM9S4/jubRNLl6P/qjNmJHLg2Bd2V/3KLei9rehVKAYow5npOYg1soig/Ww0fMosElkMHBCFc4DkaWqBM7im6+0DPMQgGmuPmRwtfLIWiPbQA2LbejS+WYV8rE4hBbDnBrvbfuWQtc2pvsW+/DPkaE7KQnvBRZ2Zj1xArdYCxw= 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 1760024442275838.8301622929603; Thu, 9 Oct 2025 08:40:42 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 2EE0B4453B; Thu, 9 Oct 2025 11:40:39 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 7519444B1B; Thu, 9 Oct 2025 11:18:04 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 24DF944212; Thu, 9 Oct 2025 11:17:51 -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 0A22644264 for ; Thu, 9 Oct 2025 11:16:40 -0400 (EDT) Received: from mx-prod-mc-03.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-563-c-cpX6vrOgeDi7YYUtzDsA-1; Thu, 09 Oct 2025 11:16:36 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1171719560B7 for ; Thu, 9 Oct 2025 15:16:36 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0A9311954128 for ; Thu, 9 Oct 2025 15:16:34 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760022999; 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=uYDgK3EshMfnB0DN9gzXroSm7Ti73vOCGL1LvDsvf6I=; b=Tp3b7VBD/RFfjGz71DbpL9Ob17jYGUX40kBcGJENDTgaf6bfoqo5U8uBcxr/EStuf8WcG3 HDBkRrtBOulbu8MEogh7Fuu0Jgn/uSAmAzPnAeL31L/Fbb/ywKmYihnXRwriZouhYd/fWU H7OI46/OeDKYAJEndQelBgLpkYC8OQQ= X-MC-Unique: c-cpX6vrOgeDi7YYUtzDsA-1 X-Mimecast-MFC-AGG-ID: c-cpX6vrOgeDi7YYUtzDsA_1760022996 To: devel@lists.libvirt.org Subject: [RFC PATCH 13/16] DO_NOT_MERGE: Update qemu capabilities after adding patches for block limits and timed stats Date: Thu, 9 Oct 2025 17:16:13 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: L2IUxnssFqvcqbApy0E8reKHGDO3vdfo2EMdHs8l33w_1760022996 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: VI7BHZKTIJ5U5EDM4V7N52GCEWWJBB47 X-Message-ID-Hash: VI7BHZKTIJ5U5EDM4V7N52GCEWWJBB47 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: 1760024447443116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Reviewed-by: Michal Privoznik --- .../caps_10.2.0_x86_64.replies | 1373 +++++++++-------- .../caps_10.2.0_x86_64.xml | 2 +- 2 files changed, 731 insertions(+), 644 deletions(-) diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.replies b/tests/= qemucapabilitiesdata/caps_10.2.0_x86_64.replies index 677d4f2964..56ee2b8151 100644 --- a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.replies +++ b/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.replies @@ -20,7 +20,7 @@ "minor": 1, "major": 10 }, - "package": "v10.1.0-1060-geb7abb4a71" + "package": "v10.1.0-1063-g3bf55b83ef" }, "id": "libvirt-2" } @@ -10539,10 +10539,15 @@ "type": "[81]" }, { - "name": "format-specific", + "name": "limits", "default": null, "type": "593" }, + { + "name": "format-specific", + "default": null, + "type": "594" + }, { "name": "backing-image", "default": null, @@ -10624,7 +10629,7 @@ }, { "name": "type", - "type": "594" + "type": "595" }, { "name": "name", @@ -10655,11 +10660,11 @@ }, { "name": "perm", - "type": "[595]" + "type": "[596]" }, { "name": "shared-perm", - "type": "[595]" + "type": "[596]" } ], "meta-type": "object" @@ -10943,7 +10948,7 @@ "members": [ { "name": "image", - "type": "596" + "type": "597" }, { "name": "config", @@ -10983,22 +10988,22 @@ { "name": "inject-error", "default": null, - "type": "[597]" + "type": "[598]" }, { "name": "set-state", "default": null, - "type": "[598]" + "type": "[599]" }, { "name": "take-child-perms", "default": null, - "type": "[595]" + "type": "[596]" }, { "name": "unshare-child-perms", "default": null, - "type": "[595]" + "type": "[596]" } ], "meta-type": "object" @@ -11008,11 +11013,11 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "log", - "type": "596" + "type": "597" }, { "name": "log-sector-size", @@ -11037,11 +11042,11 @@ "members": [ { "name": "test", - "type": "596" + "type": "597" }, { "name": "raw", - "type": "596" + "type": "597" } ], "meta-type": "object" @@ -11051,7 +11056,7 @@ "members": [ { "name": "image", - "type": "596" + "type": "597" } ], "meta-type": "object" @@ -11061,7 +11066,7 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" } ], "meta-type": "object" @@ -11071,11 +11076,11 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "target", - "type": "596" + "type": "597" }, { "name": "bitmap", @@ -11105,7 +11110,7 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "bottom", @@ -11130,12 +11135,12 @@ { "name": "locking", "default": null, - "type": "599" + "type": "600" }, { "name": "aio", "default": null, - "type": "600" + "type": "601" }, { "name": "aio-max-batch", @@ -11394,7 +11399,7 @@ "members": [ { "name": "transport", - "type": "601" + "type": "602" }, { "name": "portal", @@ -11427,7 +11432,7 @@ { "name": "header-digest", "default": null, - "type": "602" + "type": "603" }, { "name": "timeout", @@ -11442,7 +11447,7 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "key-secret", @@ -11452,7 +11457,7 @@ { "name": "header", "default": null, - "type": "596" + "type": "597" } ], "meta-type": "object" @@ -11505,7 +11510,7 @@ "members": [ { "name": "server", - "type": "603" + "type": "604" }, { "name": "path", @@ -11594,7 +11599,7 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "prealloc-align", @@ -11614,12 +11619,12 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "backing", "default": null, - "type": "604" + "type": "605" }, { "name": "lazy-refcounts", @@ -11649,7 +11654,7 @@ { "name": "overlap-check", "default": null, - "type": "605" + "type": "606" }, { "name": "cache-size", @@ -11679,12 +11684,12 @@ { "name": "encrypt", "default": null, - "type": "606" + "type": "607" }, { "name": "data-file", "default": null, - "type": "596" + "type": "597" } ], "meta-type": "object" @@ -11694,17 +11699,17 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "backing", "default": null, - "type": "604" + "type": "605" }, { "name": "encrypt", "default": null, - "type": "607" + "type": "608" } ], "meta-type": "object" @@ -11714,12 +11719,12 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "backing", "default": null, - "type": "604" + "type": "605" } ], "meta-type": "object" @@ -11734,7 +11739,7 @@ }, { "name": "children", - "type": "[596]" + "type": "[597]" }, { "name": "vote-threshold", @@ -11748,7 +11753,7 @@ { "name": "read-pattern", "default": null, - "type": "608" + "type": "609" } ], "meta-type": "object" @@ -11758,7 +11763,7 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "offset", @@ -11802,7 +11807,7 @@ { "name": "encrypt", "default": null, - "type": "609" + "type": "610" }, { "name": "user", @@ -11812,7 +11817,7 @@ { "name": "auth-client-required", "default": null, - "type": "[610]" + "type": "[611]" }, { "name": "key-secret", @@ -11822,7 +11827,7 @@ { "name": "server", "default": null, - "type": "[611]" + "type": "[612]" } ], "meta-type": "object" @@ -11832,11 +11837,11 @@ "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "mode", - "type": "612" + "type": "613" }, { "name": "top-id", @@ -11851,7 +11856,7 @@ "members": [ { "name": "server", - "type": "613" + "type": "614" }, { "name": "path", @@ -11865,7 +11870,7 @@ { "name": "host-key-check", "default": null, - "type": "614" + "type": "615" } ], "meta-type": "object" @@ -11879,7 +11884,7 @@ }, { "name": "file", - "type": "596" + "type": "597" } ], "meta-type": "object" @@ -11958,59 +11963,59 @@ "variants": [ { "case": "file", - "type": "615" + "type": "616" }, { "case": "gluster", - "type": "616" + "type": "617" }, { "case": "luks", - "type": "617" + "type": "618" }, { "case": "nfs", - "type": "618" + "type": "619" }, { "case": "parallels", - "type": "619" + "type": "620" }, { "case": "qcow", - "type": "620" + "type": "621" }, { "case": "qcow2", - "type": "621" + "type": "622" }, { "case": "qed", - "type": "622" + "type": "623" }, { "case": "rbd", - "type": "623" + "type": "624" }, { "case": "ssh", - "type": "624" + "type": "625" }, { "case": "vdi", - "type": "625" + "type": "626" }, { "case": "vhdx", - "type": "626" + "type": "627" }, { "case": "vmdk", - "type": "627" + "type": "628" }, { "case": "vpc", - "type": "628" + "type": "629" }, { "case": "blkdebug", @@ -12159,11 +12164,11 @@ "variants": [ { "case": "luks", - "type": "629" + "type": "630" }, { "case": "qcow2", - "type": "630" + "type": "631" }, { "case": "blkdebug", @@ -12428,25 +12433,25 @@ "variants": [ { "case": "inet", - "type": "632" + "type": "633" }, { "case": "unix", - "type": "633" + "type": "634" }, { "case": "vsock", - "type": "634" + "type": "635" }, { "case": "fd", - "type": "635" + "type": "636" } ], "members": [ { "name": "type", - "type": "631" + "type": "632" } ], "meta-type": "object" @@ -12552,7 +12557,7 @@ { "name": "allow-other", "default": null, - "type": "636" + "type": "637" } ], "meta-type": "object" @@ -12609,97 +12614,97 @@ "variants": [ { "case": "file", - "type": "638" + "type": "639" }, { "case": "serial", - "type": "639" + "type": "640" }, { "case": "parallel", - "type": "639" + "type": "640" }, { "case": "pipe", - "type": "639" + "type": "640" }, { "case": "socket", - "type": "640" + "type": "641" }, { "case": "udp", - "type": "641" + "type": "642" }, { "case": "pty", - "type": "642" + "type": "643" }, { "case": "null", - "type": "643" + "type": "644" }, { "case": "mux", - "type": "644" + "type": "645" }, { "case": "hub", - "type": "645" + "type": "646" }, { "case": "msmouse", - "type": "643" + "type": "644" }, { "case": "wctablet", - "type": "643" + "type": "644" }, { "case": "braille", - "type": "643" + "type": "644" }, { "case": "testdev", - "type": "643" + "type": "644" }, { "case": "stdio", - "type": "646" + "type": "647" }, { "case": "spicevmc", - "type": "647" + "type": "648" }, { "case": "spiceport", - "type": "648" + "type": "649" }, { "case": "qemu-vdagent", - "type": "649" + "type": "650" }, { "case": "dbus", - "type": "650" + "type": "651" }, { "case": "vc", - "type": "651" + "type": "652" }, { "case": "ringbuf", - "type": "652" + "type": "653" }, { "case": "memory", - "type": "652" + "type": "653" } ], "members": [ { "name": "type", - "type": "637" + "type": "638" } ], "meta-type": "object" @@ -12943,7 +12948,7 @@ { "name": "search", "default": null, - "type": "[653]" + "type": "[654]" }, { "name": "fqdn", @@ -13033,17 +13038,17 @@ { "name": "tcp-ports", "default": null, - "type": "[653]" + "type": "[654]" }, { "name": "udp-ports", "default": null, - "type": "[653]" + "type": "[654]" }, { "name": "param", "default": null, - "type": "[653]" + "type": "[654]" } ], "meta-type": "object" @@ -13109,7 +13114,7 @@ { "name": "dnssearch", "default": null, - "type": "[653]" + "type": "[654]" }, { "name": "domainname", @@ -13149,12 +13154,12 @@ { "name": "hostfwd", "default": null, - "type": "[653]" + "type": "[654]" }, { "name": "guestfwd", "default": null, - "type": "[653]" + "type": "[654]" }, { "name": "tftp-server-name", @@ -13550,25 +13555,25 @@ "variants": [ { "case": "inet", - "type": "613" + "type": "614" }, { "case": "unix", - "type": "655" + "type": "656" }, { "case": "vsock", - "type": "656" + "type": "657" }, { "case": "fd", - "type": "657" + "type": "658" } ], "members": [ { "name": "type", - "type": "631" + "type": "632" } ], "meta-type": "object" @@ -13759,11 +13764,11 @@ "variants": [ { "case": "passthrough", - "type": "658" + "type": "659" }, { "case": "emulator", - "type": "659" + "type": "660" } ], "members": [ @@ -14197,17 +14202,17 @@ "variants": [ { "case": "number", - "type": "661" + "type": "662" }, { "case": "qcode", - "type": "662" + "type": "663" } ], "members": [ { "name": "type", - "type": "660" + "type": "661" } ], "meta-type": "object" @@ -14223,29 +14228,29 @@ "variants": [ { "case": "key", - "type": "664" + "type": "665" }, { "case": "btn", - "type": "665" + "type": "666" }, { "case": "rel", - "type": "666" + "type": "667" }, { "case": "abs", - "type": "666" + "type": "667" }, { "case": "mtt", - "type": "667" + "type": "668" } ], "members": [ { "name": "type", - "type": "663" + "type": "664" } ], "meta-type": "object" @@ -14435,7 +14440,7 @@ { "name": "grab-mod", "default": null, - "type": "668" + "type": "669" } ], "meta-type": "object" @@ -14820,7 +14825,7 @@ }, { "name": "bitmaps", - "type": "[669]" + "type": "[670]" } ], "meta-type": "object" @@ -14923,11 +14928,11 @@ "members": [ { "name": "channel-type", - "type": "670" + "type": "671" }, { "name": "addr", - "type": "671" + "type": "672" } ], "meta-type": "object" @@ -15018,57 +15023,57 @@ "variants": [ { "case": "abort", - "type": "673" + "type": "674" }, { "case": "block-dirty-bitmap-add", - "type": "674" + "type": "675" }, { "case": "block-dirty-bitmap-remove", - "type": "675" + "type": "676" }, { "case": "block-dirty-bitmap-clear", - "type": "675" + "type": "676" }, { "case": "block-dirty-bitmap-enable", - "type": "675" + "type": "676" }, { "case": "block-dirty-bitmap-disable", - "type": "675" + "type": "676" }, { "case": "block-dirty-bitmap-merge", - "type": "676" + "type": "677" }, { "case": "blockdev-backup", - "type": "677" + "type": "678" }, { "case": "blockdev-snapshot", - "type": "678" + "type": "679" }, { "case": "blockdev-snapshot-internal-sync", - "type": "679" + "type": "680" }, { "case": "blockdev-snapshot-sync", - "type": "680" + "type": "681" }, { "case": "drive-backup", - "type": "681" + "type": "682" } ], "members": [ { "name": "type", - "type": "672" + "type": "673" } ], "meta-type": "object" @@ -15079,7 +15084,7 @@ { "name": "completion-mode", "default": null, - "type": "682" + "type": "683" } ], "meta-type": "object" @@ -15180,7 +15185,7 @@ "members": [ { "name": "json-type", - "type": "683" + "type": "684" } ], "meta-type": "object" @@ -15190,7 +15195,7 @@ "members": [ { "name": "members", - "type": "[684]" + "type": "[685]" }, { "name": "values", @@ -15217,7 +15222,7 @@ "members": [ { "name": "members", - "type": "[685]" + "type": "[686]" }, { "name": "tag", @@ -15227,7 +15232,7 @@ { "name": "variants", "default": null, - "type": "[686]" + "type": "[687]" } ], "meta-type": "object" @@ -15237,7 +15242,7 @@ "members": [ { "name": "members", - "type": "[687]" + "type": "[688]" } ], "meta-type": "object" @@ -15543,12 +15548,12 @@ { "name": "policy", "default": null, - "type": "688" + "type": "689" }, { "name": "rules", "default": null, - "type": "[689]" + "type": "[690]" } ], "meta-type": "object" @@ -15720,7 +15725,7 @@ { "name": "queue", "default": null, - "type": "690" + "type": "691" }, { "name": "status", @@ -15735,7 +15740,7 @@ { "name": "insert", "default": null, - "type": "691" + "type": "692" }, { "name": "interval", @@ -15754,7 +15759,7 @@ { "name": "queue", "default": null, - "type": "690" + "type": "691" }, { "name": "status", @@ -15769,7 +15774,7 @@ { "name": "insert", "default": null, - "type": "691" + "type": "692" }, { "name": "file", @@ -15793,7 +15798,7 @@ { "name": "queue", "default": null, - "type": "690" + "type": "691" }, { "name": "status", @@ -15808,7 +15813,7 @@ { "name": "insert", "default": null, - "type": "691" + "type": "692" }, { "name": "outdev", @@ -15832,7 +15837,7 @@ { "name": "queue", "default": null, - "type": "690" + "type": "691" }, { "name": "status", @@ -15847,7 +15852,7 @@ { "name": "insert", "default": null, - "type": "691" + "type": "692" }, { "name": "indev", @@ -15877,7 +15882,7 @@ { "name": "queue", "default": null, - "type": "690" + "type": "691" }, { "name": "status", @@ -15892,7 +15897,7 @@ { "name": "insert", "default": null, - "type": "691" + "type": "692" } ], "meta-type": "object" @@ -15907,7 +15912,7 @@ { "name": "queue", "default": null, - "type": "690" + "type": "691" }, { "name": "status", @@ -15922,7 +15927,7 @@ { "name": "insert", "default": null, - "type": "691" + "type": "692" }, { "name": "vnet_hdr_support", @@ -15992,7 +15997,7 @@ { "name": "grab-toggle", "default": null, - "type": "692" + "type": "693" } ], "meta-type": "object" @@ -16214,7 +16219,7 @@ { "name": "rom", "default": null, - "type": "599" + "type": "600" } ], "meta-type": "object" @@ -16496,7 +16501,7 @@ { "name": "format", "default": null, - "type": "693" + "type": "694" }, { "name": "keyid", @@ -16527,7 +16532,7 @@ { "name": "format", "default": null, - "type": "693" + "type": "694" }, { "name": "keyid", @@ -16591,7 +16596,7 @@ { "name": "legacy-vm-type", "default": null, - "type": "599" + "type": "600" } ], "meta-type": "object" @@ -16714,7 +16719,7 @@ { "name": "limits", "default": null, - "type": "694" + "type": "695" }, { "name": "x-iops-total", @@ -16887,7 +16892,7 @@ { "name": "endpoint", "default": null, - "type": "695" + "type": "696" }, { "name": "priority", @@ -16913,7 +16918,7 @@ { "name": "endpoint", "default": null, - "type": "695" + "type": "696" }, { "name": "priority", @@ -16944,7 +16949,7 @@ { "name": "endpoint", "default": null, - "type": "695" + "type": "696" }, { "name": "priority", @@ -16980,7 +16985,7 @@ { "name": "endpoint", "default": null, - "type": "695" + "type": "696" }, { "name": "priority", @@ -17198,7 +17203,7 @@ "members": [ { "name": "cpu-state", - "type": "696" + "type": "697" }, { "name": "dedicated", @@ -17401,11 +17406,11 @@ }, { "name": "hierarchy", - "type": "697" + "type": "698" }, { "name": "data-type", - "type": "698" + "type": "699" }, { "name": "latency", @@ -17437,11 +17442,11 @@ }, { "name": "associativity", - "type": "699" + "type": "700" }, { "name": "policy", - "type": "700" + "type": "701" }, { "name": "line", @@ -17487,7 +17492,7 @@ "members": [ { "name": "data", - "type": "701" + "type": "702" } ], "meta-type": "object" @@ -17497,7 +17502,7 @@ "members": [ { "name": "data", - "type": "702" + "type": "703" } ], "meta-type": "object" @@ -17507,7 +17512,7 @@ "members": [ { "name": "data", - "type": "703" + "type": "704" } ], "meta-type": "object" @@ -17517,7 +17522,7 @@ "members": [ { "name": "data", - "type": "704" + "type": "705" } ], "meta-type": "object" @@ -17527,7 +17532,7 @@ "members": [ { "name": "data", - "type": "705" + "type": "706" } ], "meta-type": "object" @@ -17721,7 +17726,7 @@ }, { "name": "type", - "type": "706" + "type": "707" }, { "name": "help", @@ -17905,12 +17910,12 @@ { "name": "in", "default": null, - "type": "707" + "type": "708" }, { "name": "out", "default": null, - "type": "707" + "type": "708" } ], "meta-type": "object" @@ -17921,12 +17926,12 @@ { "name": "in", "default": null, - "type": "708" + "type": "709" }, { "name": "out", "default": null, - "type": "708" + "type": "709" }, { "name": "threshold", @@ -17942,12 +17947,12 @@ { "name": "in", "default": null, - "type": "709" + "type": "710" }, { "name": "out", "default": null, - "type": "709" + "type": "710" } ], "meta-type": "object" @@ -17958,12 +17963,12 @@ { "name": "in", "default": null, - "type": "707" + "type": "708" }, { "name": "out", "default": null, - "type": "707" + "type": "708" }, { "name": "nsamples", @@ -17979,12 +17984,12 @@ { "name": "in", "default": null, - "type": "707" + "type": "708" }, { "name": "out", "default": null, - "type": "707" + "type": "708" }, { "name": "latency", @@ -18000,12 +18005,12 @@ { "name": "in", "default": null, - "type": "710" + "type": "711" }, { "name": "out", "default": null, - "type": "710" + "type": "711" } ], "meta-type": "object" @@ -18016,12 +18021,12 @@ { "name": "in", "default": null, - "type": "711" + "type": "712" }, { "name": "out", "default": null, - "type": "711" + "type": "712" }, { "name": "try-mmap", @@ -18047,12 +18052,12 @@ { "name": "in", "default": null, - "type": "712" + "type": "713" }, { "name": "out", "default": null, - "type": "712" + "type": "713" }, { "name": "server", @@ -18068,12 +18073,12 @@ { "name": "in", "default": null, - "type": "713" + "type": "714" }, { "name": "out", "default": null, - "type": "713" + "type": "714" } ], "meta-type": "object" @@ -18084,12 +18089,12 @@ { "name": "in", "default": null, - "type": "714" + "type": "715" }, { "name": "out", "default": null, - "type": "714" + "type": "715" } ], "meta-type": "object" @@ -18100,12 +18105,12 @@ { "name": "in", "default": null, - "type": "707" + "type": "708" }, { "name": "out", "default": null, - "type": "707" + "type": "708" }, { "name": "dev", @@ -18126,12 +18131,12 @@ { "name": "in", "default": null, - "type": "707" + "type": "708" }, { "name": "out", "default": null, - "type": "707" + "type": "708" }, { "name": "path", @@ -18179,11 +18184,11 @@ }, { "name": "class_info", - "type": "715" + "type": "716" }, { "name": "id", - "type": "716" + "type": "717" }, { "name": "irq", @@ -18201,11 +18206,11 @@ { "name": "pci_bridge", "default": null, - "type": "717" + "type": "718" }, { "name": "regions", - "type": "[718]" + "type": "[719]" } ], "meta-type": "object" @@ -18291,7 +18296,7 @@ }, { "name": "value", - "type": "719" + "type": "720" } ], "meta-type": "object" @@ -18310,12 +18315,12 @@ }, { "name": "type", - "type": "720" + "type": "721" }, { "name": "unit", "default": null, - "type": "721" + "type": "722" }, { "name": "base", @@ -18407,7 +18412,7 @@ }, { "name": "protocol-features", - "type": "722" + "type": "723" }, { "name": "max-queues", @@ -18566,7 +18571,7 @@ }, { "name": "type", - "type": "723" + "type": "724" } ], "meta-type": "object" @@ -18605,7 +18610,7 @@ "members": [ { "name": "type", - "type": "724" + "type": "725" }, { "name": "header", @@ -18772,7 +18777,7 @@ }, { "name": "reason", - "type": "725" + "type": "726" } ], "meta-type": "object" @@ -18928,39 +18933,101 @@ }, { "name": "593", + "members": [ + { + "name": "request-alignment", + "type": "int" + }, + { + "name": "max-discard", + "default": null, + "type": "int" + }, + { + "name": "discard-alignment", + "default": null, + "type": "int" + }, + { + "name": "max-write-zeroes", + "default": null, + "type": "int" + }, + { + "name": "write-zeroes-alignment", + "default": null, + "type": "int" + }, + { + "name": "opt-transfer", + "default": null, + "type": "int" + }, + { + "name": "max-transfer", + "default": null, + "type": "int" + }, + { + "name": "max-hw-transfer", + "default": null, + "type": "int" + }, + { + "name": "max-iov", + "type": "int" + }, + { + "name": "max-hw-iov", + "default": null, + "type": "int" + }, + { + "name": "min-mem-alignment", + "type": "int" + }, + { + "name": "opt-mem-alignment", + "type": "int" + } + ], + "meta-type": "object" + }, + { + "name": "594", "tag": "type", "variants": [ { "case": "qcow2", - "type": "727" + "type": "728" }, { "case": "vmdk", - "type": "728" + "type": "729" }, { "case": "luks", - "type": "729" + "type": "730" }, { "case": "rbd", - "type": "730" + "type": "731" }, { "case": "file", - "type": "731" + "type": "732" } ], "members": [ { "name": "type", - "type": "726" + "type": "727" } ], "meta-type": "object" }, { - "name": "594", + "name": "595", "members": [ { "name": "block-backend" @@ -18980,12 +19047,12 @@ ] }, { - "name": "[595]", - "element-type": "595", + "name": "[596]", + "element-type": "596", "meta-type": "array" }, { - "name": "595", + "name": "596", "members": [ { "name": "consistent-read" @@ -19009,7 +19076,7 @@ ] }, { - "name": "596", + "name": "597", "members": [ { "type": "60" @@ -19021,16 +19088,16 @@ "meta-type": "alternate" }, { - "name": "[597]", - "element-type": "597", + "name": "[598]", + "element-type": "598", "meta-type": "array" }, { - "name": "597", + "name": "598", "members": [ { "name": "event", - "type": "732" + "type": "733" }, { "name": "state", @@ -19040,7 +19107,7 @@ { "name": "iotype", "default": null, - "type": "733" + "type": "734" }, { "name": "errno", @@ -19066,16 +19133,16 @@ "meta-type": "object" }, { - "name": "[598]", - "element-type": "598", + "name": "[599]", + "element-type": "599", "meta-type": "array" }, { - "name": "598", + "name": "599", "members": [ { "name": "event", - "type": "732" + "type": "733" }, { "name": "state", @@ -19090,7 +19157,7 @@ "meta-type": "object" }, { - "name": "599", + "name": "600", "members": [ { "name": "auto" @@ -19110,7 +19177,7 @@ ] }, { - "name": "600", + "name": "601", "members": [ { "name": "threads" @@ -19130,7 +19197,7 @@ ] }, { - "name": "601", + "name": "602", "members": [ { "name": "tcp" @@ -19146,7 +19213,7 @@ ] }, { - "name": "602", + "name": "603", "members": [ { "name": "crc32c" @@ -19170,11 +19237,11 @@ ] }, { - "name": "603", + "name": "604", "members": [ { "name": "type", - "type": "734" + "type": "735" }, { "name": "host", @@ -19184,7 +19251,7 @@ "meta-type": "object" }, { - "name": "604", + "name": "605", "members": [ { "type": "60" @@ -19199,62 +19266,62 @@ "meta-type": "alternate" }, { - "name": "605", + "name": "606", "members": [ { - "type": "735" + "type": "736" }, { - "type": "736" + "type": "737" } ], "meta-type": "alternate" }, { - "name": "606", + "name": "607", "tag": "format", "variants": [ { "case": "aes", - "type": "738" + "type": "739" }, { "case": "luks", - "type": "739" + "type": "740" } ], "members": [ { "name": "format", - "type": "737" + "type": "738" } ], "meta-type": "object" }, { - "name": "607", + "name": "608", "tag": "format", "variants": [ { "case": "aes", - "type": "738" + "type": "739" } ], "members": [ { "name": "format", - "type": "740" + "type": "741" } ], "meta-type": "object" }, { - "name": "[596]", - "element-type": "596", + "name": "[597]", + "element-type": "597", "meta-type": "array" }, { - "name": "608", + "name": "609", "members": [ { "name": "quorum" @@ -19270,42 +19337,42 @@ ] }, { - "name": "609", + "name": "610", "tag": "format", "variants": [ { "case": "luks", - "type": "742" + "type": "743" }, { "case": "luks2", - "type": "743" + "type": "744" }, { "case": "luks-any", - "type": "744" + "type": "745" } ], "members": [ { "name": "format", - "type": "741" + "type": "742" }, { "name": "parent", "default": null, - "type": "609" + "type": "610" } ], "meta-type": "object" }, { - "name": "[610]", - "element-type": "610", + "name": "[611]", + "element-type": "611", "meta-type": "array" }, { - "name": "610", + "name": "611", "members": [ { "name": "cephx" @@ -19321,12 +19388,12 @@ ] }, { - "name": "[611]", - "element-type": "611", + "name": "[612]", + "element-type": "612", "meta-type": "array" }, { - "name": "611", + "name": "612", "members": [ { "name": "host", @@ -19340,7 +19407,7 @@ "meta-type": "object" }, { - "name": "612", + "name": "613", "members": [ { "name": "primary" @@ -19356,7 +19423,7 @@ ] }, { - "name": "613", + "name": "614", "members": [ { "name": "host", @@ -19415,12 +19482,12 @@ "meta-type": "object" }, { - "name": "614", + "name": "615", "tag": "mode", "variants": [ { "case": "hash", - "type": "746" + "type": "747" }, { "case": "none", @@ -19434,13 +19501,13 @@ "members": [ { "name": "mode", - "type": "745" + "type": "746" } ], "meta-type": "object" }, { - "name": "615", + "name": "616", "members": [ { "name": "filename", @@ -19453,7 +19520,7 @@ { "name": "preallocation", "default": null, - "type": "747" + "type": "748" }, { "name": "nocow", @@ -19469,7 +19536,7 @@ "meta-type": "object" }, { - "name": "616", + "name": "617", "members": [ { "name": "location", @@ -19482,13 +19549,13 @@ { "name": "preallocation", "default": null, - "type": "747" + "type": "748" } ], "meta-type": "object" }, { - "name": "617", + "name": "618", "members": [ { "name": "key-secret", @@ -19498,27 +19565,27 @@ { "name": "cipher-alg", "default": null, - "type": "748" + "type": "749" }, { "name": "cipher-mode", "default": null, - "type": "749" + "type": "750" }, { "name": "ivgen-alg", "default": null, - "type": "750" + "type": "751" }, { "name": "ivgen-hash-alg", "default": null, - "type": "751" + "type": "752" }, { "name": "hash-alg", "default": null, - "type": "751" + "type": "752" }, { "name": "iter-time", @@ -19528,12 +19595,12 @@ { "name": "file", "default": null, - "type": "596" + "type": "597" }, { "name": "header", "default": null, - "type": "596" + "type": "597" }, { "name": "size", @@ -19542,13 +19609,13 @@ { "name": "preallocation", "default": null, - "type": "747" + "type": "748" } ], "meta-type": "object" }, { - "name": "618", + "name": "619", "members": [ { "name": "location", @@ -19562,11 +19629,11 @@ "meta-type": "object" }, { - "name": "619", + "name": "620", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19581,11 +19648,11 @@ "meta-type": "object" }, { - "name": "620", + "name": "621", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19599,22 +19666,22 @@ { "name": "encrypt", "default": null, - "type": "752" + "type": "753" } ], "meta-type": "object" }, { - "name": "621", + "name": "622", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "data-file", "default": null, - "type": "596" + "type": "597" }, { "name": "data-file-raw", @@ -19633,7 +19700,7 @@ { "name": "version", "default": null, - "type": "753" + "type": "754" }, { "name": "backing-file", @@ -19648,7 +19715,7 @@ { "name": "encrypt", "default": null, - "type": "752" + "type": "753" }, { "name": "cluster-size", @@ -19658,7 +19725,7 @@ { "name": "preallocation", "default": null, - "type": "747" + "type": "748" }, { "name": "lazy-refcounts", @@ -19673,17 +19740,17 @@ { "name": "compression-type", "default": null, - "type": "754" + "type": "755" } ], "meta-type": "object" }, { - "name": "622", + "name": "623", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19713,7 +19780,7 @@ "meta-type": "object" }, { - "name": "623", + "name": "624", "members": [ { "name": "location", @@ -19731,13 +19798,13 @@ { "name": "encrypt", "default": null, - "type": "755" + "type": "756" } ], "meta-type": "object" }, { - "name": "624", + "name": "625", "members": [ { "name": "location", @@ -19751,11 +19818,11 @@ "meta-type": "object" }, { - "name": "625", + "name": "626", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19764,17 +19831,17 @@ { "name": "preallocation", "default": null, - "type": "747" + "type": "748" } ], "meta-type": "object" }, { - "name": "626", + "name": "627", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19793,7 +19860,7 @@ { "name": "subformat", "default": null, - "type": "756" + "type": "757" }, { "name": "block-state-zero", @@ -19804,11 +19871,11 @@ "meta-type": "object" }, { - "name": "627", + "name": "628", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19817,12 +19884,12 @@ { "name": "extents", "default": null, - "type": "[596]" + "type": "[597]" }, { "name": "subformat", "default": null, - "type": "757" + "type": "758" }, { "name": "backing-file", @@ -19832,7 +19899,7 @@ { "name": "adapter-type", "default": null, - "type": "758" + "type": "759" }, { "name": "hwversion", @@ -19853,11 +19920,11 @@ "meta-type": "object" }, { - "name": "628", + "name": "629", "members": [ { "name": "file", - "type": "596" + "type": "597" }, { "name": "size", @@ -19866,7 +19933,7 @@ { "name": "subformat", "default": null, - "type": "759" + "type": "760" }, { "name": "force-size", @@ -19877,11 +19944,11 @@ "meta-type": "object" }, { - "name": "629", + "name": "630", "members": [ { "name": "state", - "type": "760" + "type": "761" }, { "name": "new-secret", @@ -19912,12 +19979,12 @@ "meta-type": "object" }, { - "name": "630", + "name": "631", "members": [ { "name": "encrypt", "default": null, - "type": "761" + "type": "762" } ], "meta-type": "object" @@ -19928,7 +19995,7 @@ "meta-type": "builtin" }, { - "name": "631", + "name": "632", "members": [ { "name": "inet" @@ -19952,47 +20019,47 @@ ] }, { - "name": "632", + "name": "633", "members": [ { "name": "data", - "type": "613" + "type": "614" } ], "meta-type": "object" }, { - "name": "633", + "name": "634", "members": [ { "name": "data", - "type": "655" + "type": "656" } ], "meta-type": "object" }, { - "name": "634", + "name": "635", "members": [ { "name": "data", - "type": "656" + "type": "657" } ], "meta-type": "object" }, { - "name": "635", + "name": "636", "members": [ { "name": "data", - "type": "657" + "type": "658" } ], "meta-type": "object" }, { - "name": "636", + "name": "637", "members": [ { "name": "off" @@ -20012,7 +20079,7 @@ ] }, { - "name": "637", + "name": "638", "members": [ { "name": "file" @@ -20110,16 +20177,6 @@ "memory" ] }, - { - "name": "638", - "members": [ - { - "name": "data", - "type": "762" - } - ], - "meta-type": "object" - }, { "name": "639", "members": [ @@ -20261,12 +20318,22 @@ "meta-type": "object" }, { - "name": "[653]", - "element-type": "653", + "name": "653", + "members": [ + { + "name": "data", + "type": "777" + } + ], + "meta-type": "object" + }, + { + "name": "[654]", + "element-type": "654", "meta-type": "array" }, { - "name": "653", + "name": "654", "members": [ { "name": "str", @@ -20276,7 +20343,7 @@ "meta-type": "object" }, { - "name": "655", + "name": "656", "members": [ { "name": "path", @@ -20296,7 +20363,7 @@ "meta-type": "object" }, { - "name": "656", + "name": "657", "members": [ { "name": "cid", @@ -20310,7 +20377,7 @@ "meta-type": "object" }, { - "name": "657", + "name": "658", "members": [ { "name": "str", @@ -20320,27 +20387,27 @@ "meta-type": "object" }, { - "name": "658", + "name": "659", "members": [ { "name": "data", - "type": "777" + "type": "778" } ], "meta-type": "object" }, { - "name": "659", + "name": "660", "members": [ { "name": "data", - "type": "778" + "type": "779" } ], "meta-type": "object" }, { - "name": "660", + "name": "661", "members": [ { "name": "number" @@ -20356,7 +20423,7 @@ ] }, { - "name": "661", + "name": "662", "members": [ { "name": "data", @@ -20366,17 +20433,17 @@ "meta-type": "object" }, { - "name": "662", + "name": "663", "members": [ { "name": "data", - "type": "779" + "type": "780" } ], "meta-type": "object" }, { - "name": "663", + "name": "664", "members": [ { "name": "key" @@ -20404,41 +20471,41 @@ ] }, { - "name": "664", + "name": "665", "members": [ { "name": "data", - "type": "780" + "type": "781" } ], "meta-type": "object" }, { - "name": "665", + "name": "666", "members": [ { "name": "data", - "type": "781" + "type": "782" } ], "meta-type": "object" }, { - "name": "666", + "name": "667", "members": [ { "name": "data", - "type": "782" + "type": "783" } ], "meta-type": "object" }, { - "name": "667", + "name": "668", "members": [ { "name": "data", - "type": "783" + "type": "784" } ], "meta-type": "object" @@ -20449,7 +20516,7 @@ "meta-type": "builtin" }, { - "name": "668", + "name": "669", "members": [ { "name": "lctrl-lalt" @@ -20469,12 +20536,12 @@ ] }, { - "name": "[669]", - "element-type": "669", + "name": "[670]", + "element-type": "670", "meta-type": "array" }, { - "name": "669", + "name": "670", "members": [ { "name": "name", @@ -20487,13 +20554,13 @@ { "name": "transform", "default": null, - "type": "784" + "type": "785" } ], "meta-type": "object" }, { - "name": "670", + "name": "671", "members": [ { "name": "main" @@ -20509,7 +20576,7 @@ ] }, { - "name": "671", + "name": "672", "tag": "transport", "variants": [ { @@ -20518,27 +20585,27 @@ }, { "case": "exec", - "type": "786" + "type": "787" }, { "case": "rdma", - "type": "613" + "type": "614" }, { "case": "file", - "type": "787" + "type": "788" } ], "members": [ { "name": "transport", - "type": "785" + "type": "786" } ], "meta-type": "object" }, { - "name": "672", + "name": "673", "members": [ { "name": "abort" @@ -20597,17 +20664,17 @@ ] }, { - "name": "673", + "name": "674", "members": [ { "name": "data", - "type": "788" + "type": "789" } ], "meta-type": "object" }, { - "name": "674", + "name": "675", "members": [ { "name": "data", @@ -20617,7 +20684,7 @@ "meta-type": "object" }, { - "name": "675", + "name": "676", "members": [ { "name": "data", @@ -20627,7 +20694,7 @@ "meta-type": "object" }, { - "name": "676", + "name": "677", "members": [ { "name": "data", @@ -20637,7 +20704,7 @@ "meta-type": "object" }, { - "name": "677", + "name": "678", "members": [ { "name": "data", @@ -20647,7 +20714,7 @@ "meta-type": "object" }, { - "name": "678", + "name": "679", "members": [ { "name": "data", @@ -20657,7 +20724,7 @@ "meta-type": "object" }, { - "name": "679", + "name": "680", "members": [ { "name": "data", @@ -20667,7 +20734,7 @@ "meta-type": "object" }, { - "name": "680", + "name": "681", "members": [ { "name": "data", @@ -20677,7 +20744,7 @@ "meta-type": "object" }, { - "name": "681", + "name": "682", "members": [ { "name": "data", @@ -20687,7 +20754,7 @@ "meta-type": "object" }, { - "name": "682", + "name": "683", "members": [ { "name": "individual" @@ -20703,7 +20770,7 @@ ] }, { - "name": "683", + "name": "684", "members": [ { "name": "string" @@ -20743,12 +20810,12 @@ ] }, { - "name": "[684]", - "element-type": "684", + "name": "[685]", + "element-type": "685", "meta-type": "array" }, { - "name": "684", + "name": "685", "members": [ { "name": "name", @@ -20763,12 +20830,12 @@ "meta-type": "object" }, { - "name": "[685]", - "element-type": "685", + "name": "[686]", + "element-type": "686", "meta-type": "array" }, { - "name": "685", + "name": "686", "members": [ { "name": "name", @@ -20792,12 +20859,12 @@ "meta-type": "object" }, { - "name": "[686]", - "element-type": "686", + "name": "[687]", + "element-type": "687", "meta-type": "array" }, { - "name": "686", + "name": "687", "members": [ { "name": "case", @@ -20811,12 +20878,12 @@ "meta-type": "object" }, { - "name": "[687]", - "element-type": "687", + "name": "[688]", + "element-type": "688", "meta-type": "array" }, { - "name": "687", + "name": "688", "members": [ { "name": "type", @@ -20826,7 +20893,7 @@ "meta-type": "object" }, { - "name": "688", + "name": "689", "members": [ { "name": "deny" @@ -20842,12 +20909,12 @@ ] }, { - "name": "[689]", - "element-type": "689", + "name": "[690]", + "element-type": "690", "meta-type": "array" }, { - "name": "689", + "name": "690", "members": [ { "name": "match", @@ -20855,18 +20922,18 @@ }, { "name": "policy", - "type": "688" + "type": "689" }, { "name": "format", "default": null, - "type": "789" + "type": "790" } ], "meta-type": "object" }, { - "name": "690", + "name": "691", "members": [ { "name": "all" @@ -20886,7 +20953,7 @@ ] }, { - "name": "691", + "name": "692", "members": [ { "name": "before" @@ -20902,7 +20969,7 @@ ] }, { - "name": "692", + "name": "693", "members": [ { "name": "ctrl-ctrl" @@ -20934,7 +21001,7 @@ ] }, { - "name": "693", + "name": "694", "members": [ { "name": "raw" @@ -20950,7 +21017,7 @@ ] }, { - "name": "694", + "name": "695", "members": [ { "name": "iops-total", @@ -21051,7 +21118,7 @@ "meta-type": "object" }, { - "name": "695", + "name": "696", "members": [ { "name": "client" @@ -21067,7 +21134,7 @@ ] }, { - "name": "696", + "name": "697", "members": [ { "name": "uninitialized" @@ -21095,7 +21162,7 @@ ] }, { - "name": "697", + "name": "698", "members": [ { "name": "memory" @@ -21119,7 +21186,7 @@ ] }, { - "name": "698", + "name": "699", "members": [ { "name": "access-latency" @@ -21151,7 +21218,7 @@ ] }, { - "name": "699", + "name": "700", "members": [ { "name": "none" @@ -21171,7 +21238,7 @@ ] }, { - "name": "700", + "name": "701", "members": [ { "name": "none" @@ -21191,7 +21258,7 @@ ] }, { - "name": "701", + "name": "702", "members": [ { "name": "id", @@ -21230,7 +21297,7 @@ "meta-type": "object" }, { - "name": "702", + "name": "703", "members": [ { "name": "id", @@ -21253,7 +21320,7 @@ "meta-type": "object" }, { - "name": "703", + "name": "704", "members": [ { "name": "id", @@ -21292,7 +21359,7 @@ "meta-type": "object" }, { - "name": "704", + "name": "705", "members": [ { "name": "id", @@ -21319,7 +21386,7 @@ "meta-type": "object" }, { - "name": "705", + "name": "706", "members": [ { "name": "id", @@ -21344,7 +21411,7 @@ "meta-type": "object" }, { - "name": "706", + "name": "707", "members": [ { "name": "string" @@ -21368,7 +21435,7 @@ ] }, { - "name": "707", + "name": "708", "members": [ { "name": "mixing-engine", @@ -21398,7 +21465,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21409,7 +21476,7 @@ "meta-type": "object" }, { - "name": "708", + "name": "709", "members": [ { "name": "mixing-engine", @@ -21439,7 +21506,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21465,7 +21532,7 @@ "meta-type": "object" }, { - "name": "709", + "name": "710", "members": [ { "name": "mixing-engine", @@ -21495,7 +21562,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21511,7 +21578,7 @@ "meta-type": "object" }, { - "name": "710", + "name": "711", "members": [ { "name": "mixing-engine", @@ -21541,7 +21608,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21577,7 +21644,7 @@ "meta-type": "object" }, { - "name": "711", + "name": "712", "members": [ { "name": "mixing-engine", @@ -21607,7 +21674,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21633,7 +21700,7 @@ "meta-type": "object" }, { - "name": "712", + "name": "713", "members": [ { "name": "mixing-engine", @@ -21663,7 +21730,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21689,7 +21756,7 @@ "meta-type": "object" }, { - "name": "713", + "name": "714", "members": [ { "name": "mixing-engine", @@ -21719,7 +21786,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21745,7 +21812,7 @@ "meta-type": "object" }, { - "name": "714", + "name": "715", "members": [ { "name": "mixing-engine", @@ -21775,7 +21842,7 @@ { "name": "format", "default": null, - "type": "790" + "type": "791" }, { "name": "buffer-length", @@ -21791,7 +21858,7 @@ "meta-type": "object" }, { - "name": "715", + "name": "716", "members": [ { "name": "desc", @@ -21806,7 +21873,7 @@ "meta-type": "object" }, { - "name": "716", + "name": "717", "members": [ { "name": "device", @@ -21830,11 +21897,11 @@ "meta-type": "object" }, { - "name": "717", + "name": "718", "members": [ { "name": "bus", - "type": "791" + "type": "792" }, { "name": "devices", @@ -21845,12 +21912,12 @@ "meta-type": "object" }, { - "name": "[718]", - "element-type": "718", + "name": "[719]", + "element-type": "719", "meta-type": "array" }, { - "name": "718", + "name": "719", "members": [ { "name": "bar", @@ -21882,7 +21949,7 @@ "meta-type": "object" }, { - "name": "719", + "name": "720", "members": [ { "type": "int" @@ -21897,7 +21964,7 @@ "meta-type": "alternate" }, { - "name": "720", + "name": "721", "members": [ { "name": "cumulative" @@ -21925,7 +21992,7 @@ ] }, { - "name": "721", + "name": "722", "members": [ { "name": "bytes" @@ -21949,7 +22016,7 @@ ] }, { - "name": "722", + "name": "723", "members": [ { "name": "protocols", @@ -21964,7 +22031,7 @@ "meta-type": "object" }, { - "name": "723", + "name": "724", "members": [ { "name": "builtin" @@ -21984,7 +22051,7 @@ ] }, { - "name": "724", + "name": "725", "members": [ { "name": "cache-data-parity" @@ -22052,7 +22119,7 @@ ] }, { - "name": "725", + "name": "726", "members": [ { "name": "unknown" @@ -22080,7 +22147,7 @@ ] }, { - "name": "726", + "name": "727", "members": [ { "name": "qcow2" @@ -22107,16 +22174,6 @@ "file" ] }, - { - "name": "727", - "members": [ - { - "name": "data", - "type": "792" - } - ], - "meta-type": "object" - }, { "name": "728", "members": [ @@ -22159,6 +22216,16 @@ }, { "name": "732", + "members": [ + { + "name": "data", + "type": "797" + } + ], + "meta-type": "object" + }, + { + "name": "733", "members": [ { "name": "l1_update" @@ -22358,7 +22425,7 @@ ] }, { - "name": "733", + "name": "734", "members": [ { "name": "read" @@ -22390,7 +22457,7 @@ ] }, { - "name": "734", + "name": "735", "members": [ { "name": "inet" @@ -22402,12 +22469,12 @@ ] }, { - "name": "735", + "name": "736", "members": [ { "name": "template", "default": null, - "type": "736" + "type": "737" }, { "name": "main-header", @@ -22458,7 +22525,7 @@ "meta-type": "object" }, { - "name": "736", + "name": "737", "members": [ { "name": "none" @@ -22482,7 +22549,7 @@ ] }, { - "name": "737", + "name": "738", "members": [ { "name": "aes" @@ -22498,7 +22565,7 @@ ] }, { - "name": "738", + "name": "739", "members": [ { "name": "key-secret", @@ -22509,7 +22576,7 @@ "meta-type": "object" }, { - "name": "739", + "name": "740", "members": [ { "name": "key-secret", @@ -22520,7 +22587,7 @@ "meta-type": "object" }, { - "name": "740", + "name": "741", "members": [ { "name": "aes" @@ -22532,7 +22599,7 @@ ] }, { - "name": "741", + "name": "742", "members": [ { "name": "luks" @@ -22552,7 +22619,7 @@ ] }, { - "name": "742", + "name": "743", "members": [ { "name": "key-secret", @@ -22562,7 +22629,7 @@ "meta-type": "object" }, { - "name": "743", + "name": "744", "members": [ { "name": "key-secret", @@ -22572,7 +22639,7 @@ "meta-type": "object" }, { - "name": "744", + "name": "745", "members": [ { "name": "key-secret", @@ -22582,7 +22649,7 @@ "meta-type": "object" }, { - "name": "745", + "name": "746", "members": [ { "name": "none" @@ -22602,11 +22669,11 @@ ] }, { - "name": "746", + "name": "747", "members": [ { "name": "type", - "type": "797" + "type": "798" }, { "name": "hash", @@ -22616,7 +22683,7 @@ "meta-type": "object" }, { - "name": "747", + "name": "748", "members": [ { "name": "off" @@ -22640,7 +22707,7 @@ ] }, { - "name": "748", + "name": "749", "members": [ { "name": "aes-128" @@ -22700,7 +22767,7 @@ ] }, { - "name": "749", + "name": "750", "members": [ { "name": "ecb" @@ -22724,7 +22791,7 @@ ] }, { - "name": "750", + "name": "751", "members": [ { "name": "plain" @@ -22744,7 +22811,7 @@ ] }, { - "name": "751", + "name": "752", "members": [ { "name": "md5" @@ -22784,28 +22851,28 @@ ] }, { - "name": "752", + "name": "753", "tag": "format", "variants": [ { "case": "qcow", - "type": "738" + "type": "739" }, { "case": "luks", - "type": "799" + "type": "800" } ], "members": [ { "name": "format", - "type": "798" + "type": "799" } ], "meta-type": "object" }, { - "name": "753", + "name": "754", "members": [ { "name": "v2" @@ -22821,7 +22888,7 @@ ] }, { - "name": "754", + "name": "755", "members": [ { "name": "zlib" @@ -22837,16 +22904,16 @@ ] }, { - "name": "755", + "name": "756", "tag": "format", "variants": [ { "case": "luks", - "type": "800" + "type": "801" }, { "case": "luks2", - "type": "801" + "type": "802" }, { "case": "luks-any", @@ -22856,13 +22923,13 @@ "members": [ { "name": "format", - "type": "741" + "type": "742" } ], "meta-type": "object" }, { - "name": "756", + "name": "757", "members": [ { "name": "dynamic" @@ -22878,7 +22945,7 @@ ] }, { - "name": "757", + "name": "758", "members": [ { "name": "monolithicSparse" @@ -22906,7 +22973,7 @@ ] }, { - "name": "758", + "name": "759", "members": [ { "name": "ide" @@ -22930,7 +22997,7 @@ ] }, { - "name": "759", + "name": "760", "members": [ { "name": "dynamic" @@ -22946,7 +23013,7 @@ ] }, { - "name": "760", + "name": "761", "members": [ { "name": "active" @@ -22962,12 +23029,12 @@ ] }, { - "name": "761", + "name": "762", "tag": "format", "variants": [ { "case": "luks", - "type": "802" + "type": "803" }, { "case": "qcow", @@ -22977,13 +23044,13 @@ "members": [ { "name": "format", - "type": "798" + "type": "799" } ], "meta-type": "object" }, { - "name": "762", + "name": "763", "members": [ { "name": "logfile", @@ -23013,7 +23080,7 @@ "meta-type": "object" }, { - "name": "763", + "name": "764", "members": [ { "name": "logfile", @@ -23033,7 +23100,7 @@ "meta-type": "object" }, { - "name": "764", + "name": "765", "members": [ { "name": "logfile", @@ -23106,7 +23173,7 @@ "meta-type": "object" }, { - "name": "765", + "name": "766", "members": [ { "name": "logfile", @@ -23131,7 +23198,7 @@ "meta-type": "object" }, { - "name": "766", + "name": "767", "members": [ { "name": "logfile", @@ -23152,7 +23219,7 @@ "meta-type": "object" }, { - "name": "767", + "name": "768", "members": [ { "name": "logfile", @@ -23168,7 +23235,7 @@ "meta-type": "object" }, { - "name": "768", + "name": "769", "members": [ { "name": "logfile", @@ -23188,7 +23255,7 @@ "meta-type": "object" }, { - "name": "769", + "name": "770", "members": [ { "name": "logfile", @@ -23208,7 +23275,7 @@ "meta-type": "object" }, { - "name": "770", + "name": "771", "members": [ { "name": "logfile", @@ -23229,7 +23296,7 @@ "meta-type": "object" }, { - "name": "771", + "name": "772", "members": [ { "name": "logfile", @@ -23249,7 +23316,7 @@ "meta-type": "object" }, { - "name": "772", + "name": "773", "members": [ { "name": "logfile", @@ -23269,7 +23336,7 @@ "meta-type": "object" }, { - "name": "773", + "name": "774", "members": [ { "name": "logfile", @@ -23295,7 +23362,7 @@ "meta-type": "object" }, { - "name": "774", + "name": "775", "members": [ { "name": "logfile", @@ -23315,7 +23382,7 @@ "meta-type": "object" }, { - "name": "775", + "name": "776", "members": [ { "name": "logfile", @@ -23351,7 +23418,7 @@ "meta-type": "object" }, { - "name": "776", + "name": "777", "members": [ { "name": "logfile", @@ -23372,7 +23439,7 @@ "meta-type": "object" }, { - "name": "777", + "name": "778", "members": [ { "name": "path", @@ -23388,7 +23455,7 @@ "meta-type": "object" }, { - "name": "778", + "name": "779", "members": [ { "name": "chardev", @@ -23398,7 +23465,7 @@ "meta-type": "object" }, { - "name": "779", + "name": "780", "members": [ { "name": "unmapped" @@ -24054,7 +24121,7 @@ ] }, { - "name": "780", + "name": "781", "members": [ { "name": "key", @@ -24068,11 +24135,11 @@ "meta-type": "object" }, { - "name": "781", + "name": "782", "members": [ { "name": "button", - "type": "803" + "type": "804" }, { "name": "down", @@ -24082,11 +24149,11 @@ "meta-type": "object" }, { - "name": "782", + "name": "783", "members": [ { "name": "axis", - "type": "804" + "type": "805" }, { "name": "value", @@ -24096,11 +24163,11 @@ "meta-type": "object" }, { - "name": "783", + "name": "784", "members": [ { "name": "type", - "type": "805" + "type": "806" }, { "name": "slot", @@ -24112,7 +24179,7 @@ }, { "name": "axis", - "type": "804" + "type": "805" }, { "name": "value", @@ -24122,7 +24189,7 @@ "meta-type": "object" }, { - "name": "784", + "name": "785", "members": [ { "name": "persistent", @@ -24133,7 +24200,7 @@ "meta-type": "object" }, { - "name": "785", + "name": "786", "members": [ { "name": "socket" @@ -24157,7 +24224,7 @@ ] }, { - "name": "786", + "name": "787", "members": [ { "name": "args", @@ -24167,7 +24234,7 @@ "meta-type": "object" }, { - "name": "787", + "name": "788", "members": [ { "name": "filename", @@ -24181,12 +24248,12 @@ "meta-type": "object" }, { - "name": "788", + "name": "789", "members": [], "meta-type": "object" }, { - "name": "789", + "name": "790", "members": [ { "name": "exact" @@ -24202,7 +24269,7 @@ ] }, { - "name": "790", + "name": "791", "members": [ { "name": "u8" @@ -24238,7 +24305,7 @@ ] }, { - "name": "791", + "name": "792", "members": [ { "name": "number", @@ -24254,21 +24321,21 @@ }, { "name": "io_range", - "type": "806" + "type": "807" }, { "name": "memory_range", - "type": "806" + "type": "807" }, { "name": "prefetchable_range", - "type": "806" + "type": "807" } ], "meta-type": "object" }, { - "name": "792", + "name": "793", "members": [ { "name": "compat", @@ -24306,22 +24373,22 @@ { "name": "encrypt", "default": null, - "type": "807" + "type": "808" }, { "name": "bitmaps", "default": null, - "type": "[808]" + "type": "[809]" }, { "name": "compression-type", - "type": "754" + "type": "755" } ], "meta-type": "object" }, { - "name": "793", + "name": "794", "members": [ { "name": "create-type", @@ -24337,34 +24404,34 @@ }, { "name": "extents", - "type": "[809]" + "type": "[810]" } ], "meta-type": "object" }, { - "name": "794", + "name": "795", "members": [ { "name": "cipher-alg", - "type": "748" + "type": "749" }, { "name": "cipher-mode", - "type": "749" + "type": "750" }, { "name": "ivgen-alg", - "type": "750" + "type": "751" }, { "name": "ivgen-hash-alg", "default": null, - "type": "751" + "type": "752" }, { "name": "hash-alg", - "type": "751" + "type": "752" }, { "name": "detached-header", @@ -24384,24 +24451,24 @@ }, { "name": "slots", - "type": "[810]" + "type": "[811]" } ], "meta-type": "object" }, { - "name": "795", + "name": "796", "members": [ { "name": "encryption-format", "default": null, - "type": "741" + "type": "742" } ], "meta-type": "object" }, { - "name": "796", + "name": "797", "members": [ { "name": "extent-size-hint", @@ -24412,7 +24479,7 @@ "meta-type": "object" }, { - "name": "797", + "name": "798", "members": [ { "name": "md5" @@ -24432,7 +24499,7 @@ ] }, { - "name": "798", + "name": "799", "members": [ { "name": "qcow" @@ -24448,7 +24515,7 @@ ] }, { - "name": "799", + "name": "800", "members": [ { "name": "key-secret", @@ -24458,27 +24525,27 @@ { "name": "cipher-alg", "default": null, - "type": "748" + "type": "749" }, { "name": "cipher-mode", "default": null, - "type": "749" + "type": "750" }, { "name": "ivgen-alg", "default": null, - "type": "750" + "type": "751" }, { "name": "ivgen-hash-alg", "default": null, - "type": "751" + "type": "752" }, { "name": "hash-alg", "default": null, - "type": "751" + "type": "752" }, { "name": "iter-time", @@ -24489,7 +24556,7 @@ "meta-type": "object" }, { - "name": "800", + "name": "801", "members": [ { "name": "key-secret", @@ -24498,13 +24565,13 @@ { "name": "cipher-alg", "default": null, - "type": "748" + "type": "749" } ], "meta-type": "object" }, { - "name": "801", + "name": "802", "members": [ { "name": "key-secret", @@ -24513,17 +24580,17 @@ { "name": "cipher-alg", "default": null, - "type": "748" + "type": "749" } ], "meta-type": "object" }, { - "name": "802", + "name": "803", "members": [ { "name": "state", - "type": "760" + "type": "761" }, { "name": "new-secret", @@ -24554,7 +24621,7 @@ "meta-type": "object" }, { - "name": "803", + "name": "804", "members": [ { "name": "left" @@ -24602,7 +24669,7 @@ ] }, { - "name": "804", + "name": "805", "members": [ { "name": "x" @@ -24618,7 +24685,7 @@ ] }, { - "name": "805", + "name": "806", "members": [ { "name": "begin" @@ -24646,7 +24713,7 @@ ] }, { - "name": "806", + "name": "807", "members": [ { "name": "base", @@ -24660,12 +24727,12 @@ "meta-type": "object" }, { - "name": "807", + "name": "808", "tag": "format", "variants": [ { "case": "luks", - "type": "794" + "type": "795" }, { "case": "aes", @@ -24675,18 +24742,18 @@ "members": [ { "name": "format", - "type": "737" + "type": "738" } ], "meta-type": "object" }, { - "name": "[808]", - "element-type": "808", + "name": "[809]", + "element-type": "809", "meta-type": "array" }, { - "name": "808", + "name": "809", "members": [ { "name": "name", @@ -24698,18 +24765,18 @@ }, { "name": "flags", - "type": "[811]" + "type": "[812]" } ], "meta-type": "object" }, { - "name": "[809]", - "element-type": "809", + "name": "[810]", + "element-type": "810", "meta-type": "array" }, { - "name": "809", + "name": "810", "members": [ { "name": "filename", @@ -24737,12 +24804,12 @@ "meta-type": "object" }, { - "name": "[810]", - "element-type": "810", + "name": "[811]", + "element-type": "811", "meta-type": "array" }, { - "name": "810", + "name": "811", "members": [ { "name": "active", @@ -24766,12 +24833,12 @@ "meta-type": "object" }, { - "name": "[811]", - "element-type": "811", + "name": "[812]", + "element-type": "812", "meta-type": "array" }, { - "name": "811", + "name": "812", "members": [ { "name": "in-use" @@ -27799,15 +27866,15 @@ "name": "iothread", "type": "link" }, - { - "name": "serial", - "type": "str" - }, { "default-value": 0, "name": "cyls", "type": "uint32" }, + { + "name": "serial", + "type": "str" + }, { "default-value": 0, "name": "min_io_size", @@ -27970,6 +28037,12 @@ "description": "on/off", "type": "bool" }, + { + "default-value": true, + "name": "indirect_desc", + "description": "on/off", + "type": "bool" + }, { "default-value": "auto", "name": "account-failed", @@ -27977,10 +28050,9 @@ "type": "OnOffAuto" }, { - "default-value": true, - "name": "indirect_desc", - "description": "on/off", - "type": "bool" + "default-value": [], + "name": "stats-intervals", + "type": "list" }, { "default-value": true, @@ -29313,8 +29385,8 @@ }, { "default-value": 0, - "name": "min_io_size", - "type": "size" + "name": "heads", + "type": "uint32" }, { "name": "product", @@ -29327,8 +29399,8 @@ }, { "default-value": 0, - "name": "heads", - "type": "uint32" + "name": "min_io_size", + "type": "size" }, { "default-value": true, @@ -29412,6 +29484,11 @@ "name": "port_wwn", "type": "uint64" }, + { + "default-value": 0, + "name": "lheads", + "type": "uint32" + }, { "default-value": 0, "name": "port_index", @@ -29424,9 +29501,9 @@ "type": "OnOffAuto" }, { - "default-value": 0, - "name": "lheads", - "type": "uint32" + "default-value": [], + "name": "stats-intervals", + "type": "list" }, { "name": "device_id", @@ -29546,24 +29623,29 @@ }, { "default-value": 0, - "name": "cyls", + "name": "lcyls", "type": "uint32" }, { "default-value": 0, - "name": "lcyls", + "name": "cyls", "type": "uint32" }, + { + "default-value": "auto", + "name": "rerror", + "description": "Error handling policy (report/ignore/enospc/stop/aut= o)", + "type": "BlockdevOnError" + }, { "default-value": 0, "name": "opt_io_size", "type": "size" }, { - "default-value": "auto", - "name": "rerror", - "description": "Error handling policy (report/ignore/enospc/stop/aut= o)", - "type": "BlockdevOnError" + "default-value": 0, + "name": "min_io_size", + "type": "size" }, { "default-value": "auto", @@ -29572,9 +29654,9 @@ "type": "BiosAtaTranslation" }, { - "default-value": 0, - "name": "min_io_size", - "type": "size" + "default-value": [], + "name": "stats-intervals", + "type": "list" }, { "default-value": "auto", @@ -29863,25 +29945,31 @@ "type": "str" }, { - "default-value": false, - "name": "commandlog", - "description": "on/off", - "type": "bool" + "default-value": "auto", + "name": "account-invalid", + "description": "on/off/auto", + "type": "OnOffAuto" }, { - "default-value": "auto", - "name": "rerror", - "description": "Error handling policy (report/ignore/enospc/stop/aut= o)", - "type": "BlockdevOnError" + "name": "drive", + "description": "Node name or ID of a block device to use as a backen= d", + "type": "str" }, { "default-value": 0, - "name": "min_io_size", + "name": "logical_block_size", + "description": "A power of two between 512 B and 2 MiB", "type": "size" }, + { + "default-value": false, + "name": "share-rw", + "description": "on/off", + "type": "bool" + }, { "default-value": "auto", - "name": "backend_defaults", + "name": "write-cache", "description": "on/off/auto", "type": "OnOffAuto" }, @@ -29892,28 +29980,21 @@ "type": "bool" }, { - "default-value": false, - "name": "share-rw", - "description": "on/off", - "type": "bool" + "default-value": 4294967295, + "name": "discard_granularity", + "type": "size" }, { "default-value": "auto", - "name": "account-failed", + "name": "backend_defaults", "description": "on/off/auto", "type": "OnOffAuto" }, - { - "default-value": 0, - "name": "logical_block_size", - "description": "A power of two between 512 B and 2 MiB", - "type": "size" - }, { "default-value": "auto", - "name": "write-cache", - "description": "on/off/auto", - "type": "OnOffAuto" + "name": "rerror", + "description": "Error handling policy (report/ignore/enospc/stop/aut= o)", + "type": "BlockdevOnError" }, { "default-value": 0, @@ -29921,20 +30002,20 @@ "type": "size" }, { - "default-value": "auto", - "name": "account-invalid", - "description": "on/off/auto", - "type": "OnOffAuto" + "default-value": 0, + "name": "min_io_size", + "type": "size" }, { - "name": "drive", - "description": "Node name or ID of a block device to use as a backen= d", - "type": "str" + "default-value": [], + "name": "stats-intervals", + "type": "list" }, { - "default-value": 4294967295, - "name": "discard_granularity", - "type": "size" + "default-value": "auto", + "name": "account-failed", + "description": "on/off/auto", + "type": "OnOffAuto" }, { "default-value": 0, @@ -29942,6 +30023,12 @@ "description": "A power of two between 512 B and 2 MiB", "type": "size" }, + { + "default-value": false, + "name": "commandlog", + "description": "on/off", + "type": "bool" + }, { "default-value": "auto", "name": "werror", diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml b/tests/qemu= capabilitiesdata/caps_10.2.0_x86_64.xml index 3e5e2cdb08..59d33c7049 100644 --- a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml @@ -217,7 +217,7 @@ 10001050 43100287 - v10.1.0-1060-geb7abb4a71 + v10.1.0-1063-g3bf55b83ef x86_64 --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760024302; cv=none; d=zohomail.com; s=zohoarc; b=NovbSA8k4gpPBooHkkaa3QwDknbolt5y8JbuNtNven9h6+rRNbPVrxDfiTbmFwj4bYiCf2BoOTOcrXZN9u3iUv5HMMpVPSkZs1t95R1oXW7c2ciQ8Mc31CrPsSC25h/TNz9SoaayfSxiLIDUaof9tDA8PdMdhNqm8tTSIR5fPqc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760024302; 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=+3O8c78Gi19iPsV0gzOK70JJ3M4Rs22E3fP98SXg2B8=; b=L5o4KkopEoKsDwHryxA2sDryQnJNthJq3/DX5F1/2z1jKMX6gdOSNTmRQyOD1jk8PJv1tb3BAegSpl9KPPD6wcm7qMmfqN7b6FAmxpv+nDH8v5PXddffSsMhCUXJsav23f8j9dBphaUc8Vea2JHe2jJLO5tElDNRmsBAhZFa2Dc= 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 176002430275074.33781495343453; Thu, 9 Oct 2025 08:38:22 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 2109444350; Thu, 9 Oct 2025 11:38:22 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 277FE44AC0; Thu, 9 Oct 2025 11:17:58 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id C22594434E; Thu, 9 Oct 2025 11:17: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 ADEB643F04 for ; Thu, 9 Oct 2025 11:16:40 -0400 (EDT) Received: from mx-prod-mc-04.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-516-Ot7i4WaxPROXTdWnTVvT-A-1; Thu, 09 Oct 2025 11:16:38 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4FDC119560AD for ; Thu, 9 Oct 2025 15:16:37 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 879641955F22 for ; Thu, 9 Oct 2025 15:16:36 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760023000; 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=+3O8c78Gi19iPsV0gzOK70JJ3M4Rs22E3fP98SXg2B8=; b=MEDkbmlT1VIH/avTvfMHKDA5Zm92khqCHcNl4dxvpJUkhST5LG6hi+E8snH3EhogHw13Dw 2fv+QyIU3c4YYVeCnuCg74rCKuk8teULrEnB4XnDqr1hTnP71Jyj7UkPxvCl9luWuk0X5U uzu4eIezxOD7FLYPuXelT9Nt8g7Redc= X-MC-Unique: Ot7i4WaxPROXTdWnTVvT-A-1 X-Mimecast-MFC-AGG-ID: Ot7i4WaxPROXTdWnTVvT-A_1760022997 To: devel@lists.libvirt.org Subject: [RFC PATCH 14/16] qemu: capabilities: Introduce QEMU_CAPS_DISK_TIMED_STATS Date: Thu, 9 Oct 2025 17:16:14 +0200 Message-ID: <1fe8e808e605c6ad5505bbb6ae97e2061fbaf5ed.1760022633.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 0_8fJSuwLgK_2rWJNcfEP0X8TonvYBFTCoNBFUxDVbQ_1760022997 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: FBSCOYLERFTKSU2BBLU2PLHQ34BI6Y52 X-Message-ID-Hash: FBSCOYLERFTKSU2BBLU2PLHQ34BI6Y52 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: 1760024305223154100 Content-Type: text/plain; charset="utf-8" From: Peter Krempa The capability tracks support for 'stats-intervals' property of disk frontends which enables statistics collection on the devices. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_capabilities.c | 5 +++++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml | 1 + 3 files changed, 7 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 618291e5b6..7d643c5357 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -746,6 +746,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 485 */ "acpi-generic-initiator", /* QEMU_CAPS_ACPI_GENERIC_INITIATO= R */ + "disk-timed-stats", /* QEMU_CAPS_DISK_TIMED_STATS */ ); @@ -1478,6 +1479,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCaps= DevicePropsVirtioBlk[] =3D { { "queue-size", QEMU_CAPS_VIRTIO_BLK_QUEUE_SIZE, NULL }, { "acpi-index", QEMU_CAPS_ACPI_INDEX, NULL }, { "iothread-vq-mapping", QEMU_CAPS_VIRTIO_BLK_IOTHREAD_MAPPING, NULL }, + { "stats-intervals", QEMU_CAPS_DISK_TIMED_STATS, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsVirtioNet[= ] =3D { @@ -1509,9 +1511,11 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCap= sDevicePropsVfioPCI[] =3D { static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsSCSIDisk[]= =3D { { "channel", QEMU_CAPS_SCSI_DISK_CHANNEL, NULL }, { "rotation_rate", QEMU_CAPS_ROTATION_RATE, NULL }, + { "stats-intervals", QEMU_CAPS_DISK_TIMED_STATS, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsIDEDrive[]= =3D { + { "stats-intervals", QEMU_CAPS_DISK_TIMED_STATS, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsPiix4PM[] = =3D { @@ -1523,6 +1527,7 @@ static struct virQEMUCapsDevicePropsFlags virQEMUCaps= DevicePropsUSBRedir[] =3D { }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsUSBStorage= [] =3D { + { "stats-intervals", QEMU_CAPS_DISK_TIMED_STATS, NULL }, }; static struct virQEMUCapsDevicePropsFlags virQEMUCapsDevicePropsKVMPit[] = =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index c71fc19a03..3e9963bb85 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -727,6 +727,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ /* 485 */ QEMU_CAPS_ACPI_GENERIC_INITIATOR, /* -object acpi-generic-initiator */ + QEMU_CAPS_DISK_TIMED_STATS, /* timed stats support ('stats-intervals' = property of disk frontends) */ QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml b/tests/qemu= capabilitiesdata/caps_10.2.0_x86_64.xml index 59d33c7049..49fdb6edba 100644 --- a/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml @@ -215,6 +215,7 @@ + 10001050 43100287 v10.1.0-1063-g3bf55b83ef --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760024547; cv=none; d=zohomail.com; s=zohoarc; b=JRu6mKHbbYV3cVeRoCXkZOdW1VfrpilC9IzcSi0vEGbcc4+ztjeS+3R+43uridq3eqchGDVJRvIWcdZflGXq1NYK2gAVKbHXISdWMHBjsr2D1iqCbeoIGHnXa7Mu7KI3QFi+UQdtFAuc1XRshRXXgSe0NyleTD+DeJdovpelUyQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760024547; 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=P/ftEzwY4RB5wg+7JlR8q6OrAsSqIsz/GraiTtj9t58=; b=S7HW9B/m8ixcwzHWN+sv3taY4REy8vJ/u4cBLeEC6UbjONHwn7f56lOVdB1I0wRzNEKfxFf0hV1VKTCBwhP3IqpYQo7VXPmeXdbffZDUtyUxoyT+mPKTwKlW6BzFP5sMKsTi1cruISGx85TLNLgu+1vZpRjcTQgctlpiaTK5DZY= 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 1760024547644737.4532236871502; Thu, 9 Oct 2025 08:42:27 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id A0820418C8; Thu, 9 Oct 2025 11:42:25 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 38CF643F5B; Thu, 9 Oct 2025 11:18:09 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id A45AE44AB5; Thu, 9 Oct 2025 11:17:57 -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 391CD44285 for ; Thu, 9 Oct 2025 11:16:41 -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-653-UuwmTwD2O3mD_rzp30eynQ-1; Thu, 09 Oct 2025 11:16:39 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 907881956089 for ; Thu, 9 Oct 2025 15:16:38 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C7D6E1955F22 for ; Thu, 9 Oct 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=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760023000; 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=P/ftEzwY4RB5wg+7JlR8q6OrAsSqIsz/GraiTtj9t58=; b=QkILp4ggWGiPM+vj4HRO7KLHeDzMiip0Vp7xj9JXo3AfH6yE/cOaCEuKWeG1ZM5wI6NOpU 4xH5rQXHHlh5CB4iZxk1EZ7ckAnRDa1gHbZc/CXJBbGaxkkCmznNS5ww4OBZwn54p54oqY XmefZ2AyzH6PziofLTJWeVfqpxCafAI= X-MC-Unique: UuwmTwD2O3mD_rzp30eynQ-1 X-Mimecast-MFC-AGG-ID: UuwmTwD2O3mD_rzp30eynQ_1760022998 To: devel@lists.libvirt.org Subject: [RFC PATCH 15/16] conf: Add configuration option for timed disk statistics collection Date: Thu, 9 Oct 2025 17:16:15 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 51A3dhj80YLl5UYYftnrE2HNfKqNAS8UF19v9DPwQsg_1760022998 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: WPDBCOB6ISCQNQNRKR4JTV4VEOJCTYHY X-Message-ID-Hash: WPDBCOB6ISCQNQNRKR4JTV4VEOJCTYHY 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: 1760024551515154100 Content-Type: text/plain; charset="utf-8" From: Peter Krempa QEMU supports collection of disk statistics in configurable time windows. Add support for enabling this feature to the conf parser. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- docs/formatdomain.rst | 17 ++++++++++++++++ src/conf/domain_conf.c | 34 +++++++++++++++++++++++++++++++ src/conf/domain_conf.h | 2 ++ src/conf/schemas/domaincommon.rng | 11 ++++++++++ 4 files changed, 64 insertions(+) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index f50dce477f..f46a21463f 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -3588,6 +3588,23 @@ paravirtualized driver is specified via the ``disk``= element. + - The optional ``statistics`` sub-element allows configuring statistics + collection in configurable intervals for the given disk. Intervals are + configured by ```` sub-elements with ``interval`` attribute + configuring the collection window duration in seconds. The statistics + are available via the bulk statistics API. + + Example:: + + + + + + + + + :since:`Since 11.9.0 (QEMU 10.2, virtio, ide, scsi disks only)`. + - The optional ``queues`` attribute specifies the number of virt queue= s for virtio-blk ( :since:`Since 3.9.0` ) or vhost-user-blk ( :since:`Since 7.1.0` ) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 281846dfbe..b6832d193a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8288,6 +8288,8 @@ static int virDomainDiskDefDriverParseXML(virDomainDiskDef *def, xmlNodePtr cur) { + xmlNodePtr statisticsNode; + def->driverName =3D virXMLPropString(cur, "name"); if (virXMLPropEnum(cur, "cache", virDomainDiskCacheTypeFromString, @@ -8337,6 +8339,26 @@ virDomainDiskDefDriverParseXML(virDomainDiskDef *def, if (virDomainIothreadMappingDefParse(cur, &def->iothreads) < 0) return -1; + if ((statisticsNode =3D virXMLNodeGetSubelement(cur, "statistics"))) { + g_autoptr(GPtrArray) statisticNodes =3D NULL; + + statisticNodes =3D virXMLNodeGetSubelementList(statisticsNode, "st= atistic"); + + if (statisticNodes->len > 0) { + size_t i; + + def->statistics =3D g_new0(unsigned int, statisticNodes->len += 1); + + for (i =3D 0; i < statisticNodes->len; i++) { + if (virXMLPropUInt(g_ptr_array_index(statisticNodes, i), + "interval", 10, + VIR_XML_PROP_REQUIRED | VIR_XML_PROP_NO= NZERO, + def->statistics + i) < 0) + return -1; + } + } + } + if (virXMLPropEnum(cur, "detect_zeroes", virDomainDiskDetectZeroesTypeFromString, VIR_XML_PROP_NONZERO, &def->detect_zeroes) < 0) @@ -23826,6 +23848,18 @@ virDomainDiskDefFormatDriver(virBuffer *buf, virDomainIothreadMappingDefFormat(&childBuf, disk->iothreads); + if (disk->statistics) { + g_auto(virBuffer) statisticsChildBuf =3D VIR_BUFFER_INIT_CHILD(&ch= ildBuf); + size_t i; + + for (i =3D 0; disk->statistics[i] > 0; i++) + virBufferAsprintf(&statisticsChildBuf, "\n", + disk->statistics[i]); + + virXMLFormatElement(&childBuf, "statistics", NULL, &statisticsChil= dBuf); + } + + virXMLFormatElement(buf, "driver", &attrBuf, &childBuf); } diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 39807b5fe3..4110ca75ac 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -591,6 +591,8 @@ struct _virDomainDiskDef { virDomainDiskDiscard discard; unsigned int iothread; /* unused =3D 0, > 0 specific thread # */ GSList *iothreads; /* List of virDomainIothreadMappingDef */ + unsigned int *statistics; /* Optional, zero terminated list of interva= ls to + collect statistics for */ virDomainDiskDetectZeroes detect_zeroes; virTristateSwitch discard_no_unref; char *domain_name; /* backend domain name */ diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index b9230a35b4..1303c392ae 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -2742,6 +2742,17 @@ + + + + + + + + + + + --=20 2.51.0 From nobody Tue Oct 28 08:17:43 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=1760024658; cv=none; d=zohomail.com; s=zohoarc; b=EyY0aOqNVk8kjLde7nldAlSk8PUFQd2dlPxdUBK/OijphOfJXbMGckD3yWisuR73rmUZygBwtyd6vta/jj27SyPJUK13Ewv+MXzWRJ1KlyZdXcANyO9tGT5pI0lRGBkvxKrfvdsElCz416jWL1733yOEbgVfzXxaUsTTr6FScic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1760024658; 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=tmdx+VjuC/XiQNUMaG5hlVuz2QXHPN8kV2H1L84Uo7c=; b=kIOW3q6gjRRyroLSwKqb+cqC43iJ1j2hXQoypX86w7uhLs7L0PqkkxNCx6lBtiIjbGN2PxdfAJ+JeQvQ3U6qNqmVf1irFqi5Z5LyfZwLDt1WugNgCGhIhNAERBF2VzS1sGcXbPGDj3J8lw4sUwmItbnHT2xeff53zaCSlHWetNQ= 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 1760024658720419.64371143352366; Thu, 9 Oct 2025 08:44:18 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id A25C741C6E; Thu, 9 Oct 2025 11:44:17 -0400 (EDT) Received: from [172.19.199.20] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 9996D44ABC; Thu, 9 Oct 2025 11:18:23 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id B64AE41873; Thu, 9 Oct 2025 11:18:14 -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 7829F43F55 for ; Thu, 9 Oct 2025 11:16:43 -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-342-MsOJ-xx2OY6LQyEgNlxHqg-1; Thu, 09 Oct 2025 11:16:41 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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 D16AC19560AF for ; Thu, 9 Oct 2025 15:16:39 +0000 (UTC) Received: from speedmetal.lan (unknown [10.44.22.12]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 14BED1955F22 for ; Thu, 9 Oct 2025 15:16:38 +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.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, 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=1760023003; 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=tmdx+VjuC/XiQNUMaG5hlVuz2QXHPN8kV2H1L84Uo7c=; b=cT+ZRVxaEFx3XkKisuSjhW/cXIlmIzmojjVjpMyqSuBkxRBPLUERUgOWJS+daHIsQbHmwH 3kcR5ieC/svvBxviG/pT71c5M/DsWAEQ6Gd+Fc94CXDDB2RiAafBA6krKqIRNcfBJZpwKU 9Nz92MGxTmowLGIxgOhISQpp0F6iUdk= X-MC-Unique: MsOJ-xx2OY6LQyEgNlxHqg-1 X-Mimecast-MFC-AGG-ID: MsOJ-xx2OY6LQyEgNlxHqg_1760022999 To: devel@lists.libvirt.org Subject: [RFC PATCH 16/16] qemu: Add support for enabling timed block device statistics collection Date: Thu, 9 Oct 2025 17:16:16 +0200 Message-ID: <1f5536388b7d2640779570fff016183e109a234a.1760022633.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: CeUgBpigGJSmqtmunZMbb6BseSQxO4wUDz2gOV0vp5k_1760022999 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: CXCW6H222CPTAMJ2OGPFDPM6XP3ZVJYL X-Message-ID-Hash: CXCW6H222CPTAMJ2OGPFDPM6XP3ZVJYL 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: 1760024659306116600 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Add validation that qemu supports the collection of statistics and enable it on the block device commandline. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_command.c | 15 +++++ src/qemu/qemu_validate.c | 29 ++++++++++ ...sk-statistics-intervals.x86_64-latest.args | 37 ++++++++++++ ...isk-statistics-intervals.x86_64-latest.xml | 57 +++++++++++++++++++ .../disk-statistics-intervals.xml | 46 +++++++++++++++ tests/qemuxmlconftest.c | 1 + 6 files changed, 185 insertions(+) create mode 100644 tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-= latest.args create mode 100644 tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-= latest.xml create mode 100644 tests/qemuxmlconfdata/disk-statistics-intervals.xml diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 08e2a5147d..7ed2b43330 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -1688,6 +1688,7 @@ qemuBuildDiskDeviceProps(const virDomainDef *def, const char *alias =3D disk->info.alias; g_autofree char *usbdiskalias =3D NULL; const virDomainDeviceInfo *deviceinfo =3D &disk->info; + g_autoptr(virJSONValue) statistics =3D NULL; virDomainDeviceInfo usbSCSIinfo =3D { .type =3D VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE, .addr.drive =3D { .diskbus =3D VIR_DOMAIN_DISK_BUS_USB }, @@ -1895,6 +1896,19 @@ qemuBuildDiskDeviceProps(const virDomainDef *def, qemuBuildDiskGetErrorPolicy(disk, &wpolicy, &rpolicy); + if (disk->statistics) { + size_t i; + + statistics =3D virJSONValueNewArray(); + + for (i =3D 0; disk->statistics[i] > 0; i++) { + g_autoptr(virJSONValue) num =3D virJSONValueNewNumberUint(disk= ->statistics[i]); + + if (virJSONValueArrayAppend(statistics, &num) < 0) + return NULL; + } + } + if (virJSONValueObjectAdd(&props, "S:device_id", scsiVPDDeviceId, "T:share-rw", shareRW, @@ -1919,6 +1933,7 @@ qemuBuildDiskDeviceProps(const virDomainDef *def, "S:serial", serial, "S:werror", wpolicy, "S:rerror", rpolicy, + "A:stats-intervals", &statistics, NULL) < 0) return NULL; diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 7f3ffe8bd5..036b399945 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -3358,6 +3358,35 @@ qemuValidateDomainDeviceDefDiskFrontend(const virDom= ainDiskDef *disk, if (qemuValidateDomainDeviceDefDiskIOThreads(def, disk, qemuCaps) < 0) return -1; + if (disk->statistics) { + if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DISK_TIMED_STATS)) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("statistics collection is not supported by th= is QEMU binary")); + return -1; + } + + switch (disk->bus) { + case VIR_DOMAIN_DISK_BUS_SCSI: + case VIR_DOMAIN_DISK_BUS_IDE: + case VIR_DOMAIN_DISK_BUS_SATA: + case VIR_DOMAIN_DISK_BUS_VIRTIO: + case VIR_DOMAIN_DISK_BUS_USB: + break; + + case VIR_DOMAIN_DISK_BUS_FDC: + case VIR_DOMAIN_DISK_BUS_NVME: + case VIR_DOMAIN_DISK_BUS_XEN: + case VIR_DOMAIN_DISK_BUS_SD: + case VIR_DOMAIN_DISK_BUS_NONE: + case VIR_DOMAIN_DISK_BUS_UML: + case VIR_DOMAIN_DISK_BUS_LAST: + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("statistics collection is not supported by di= sks on bus '%1$s'"), + NULLSTR(virDomainDiskBusTypeToString(disk->bus)= )); + return -1; + } + } + return 0; } diff --git a/tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.= args b/tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.args new file mode 100644 index 0000000000..3dd3dee99d --- /dev/null +++ b/tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-QEMUGuest1/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-QEMUGuest1/master-key.aes"}' \ +-machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram,acpi= =3Doff \ +-accel tcg \ +-cpu qemu64 \ +-m size=3D219136k \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ +-overcommit mem-lock=3Doff \ +-smp 2,sockets=3D2,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-device '{"driver":"virtio-scsi-pci","id":"scsi0","bus":"pci.0","addr":"0x= 2"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/iothrtest1= .img","node-name":"libvirt-2-storage","read-only":false}' \ +-device '{"driver":"virtio-blk-pci","bus":"pci.0","addr":"0x3","drive":"li= bvirt-2-storage","id":"virtio-disk0","bootindex":1,"stats-intervals":[3,10]= }' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/images/iothrtest2= .img","node-name":"libvirt-1-storage","read-only":false}' \ +-device '{"driver":"scsi-hd","bus":"scsi0.0","channel":0,"scsi-id":0,"lun"= :3,"device_id":"drive-scsi0-0-0-3","drive":"libvirt-1-storage","id":"scsi0-= 0-0-3","stats-intervals":[5,15]}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.= xml b/tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.xml new file mode 100644 index 0000000000..4c55c50ef5 --- /dev/null +++ b/tests/qemuxmlconfdata/disk-statistics-intervals.x86_64-latest.xml @@ -0,0 +1,57 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219136 + 219136 + 2 + + hvm + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + + + +
+ + + + + + + + + + +
+ + +
+ + +
+ + + +
+ + + +