From nobody Mon Feb 9 05:21:05 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1667989090; cv=none; d=zohomail.com; s=zohoarc; b=Qr8DHJH2qUDGndtZh3hbPe37/3jq0+jlugxF48Xa0kTjQNaVtldUIOocUokfmO1Dvif95Xn+T6iS/+7k6W5T+CnQNHdZUGU43thLeAC5X0z+zKw7I5EQQr2mlF19MQAfoWezg25TSdLZhNO0bMbKvpMKgv5Mmu31n6HBVRzyp9A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667989090; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zFgJn+b/b2somUNJJvKktzJshWkEswHKkHurch/JXjU=; b=Q+LFHySf4vgNoIqNDCJYg7g5Q+g2qaG1CJclTgoT9WtnBtSnOvhQ6x9V047LiJ51cRsqb72seq7T+4orSjr8XVTdTbUcHqVqnhSNpMTfMEsqZeclgBTbjOmSSznZS2lNXOnKAmpZmMyrmOgj/tDNedCz1slNURDS+MeOl1EPLug= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1667989090354437.0216538190032; Wed, 9 Nov 2022 02:18:10 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-644-GyhM3XL3O4WAvGegOaRuXQ-1; Wed, 09 Nov 2022 05:17:26 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2D6C680600C; Wed, 9 Nov 2022 10:17:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16E79492B1A; Wed, 9 Nov 2022 10:17:24 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CFC5A1946A41; Wed, 9 Nov 2022 10:17:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id AAD82194658F for ; Wed, 9 Nov 2022 10:17:22 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8D9FA2166B37; Wed, 9 Nov 2022 10:17:22 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-16.brq.redhat.com [10.40.208.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id D98142166B2E for ; Wed, 9 Nov 2022 10:17:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667989089; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=zFgJn+b/b2somUNJJvKktzJshWkEswHKkHurch/JXjU=; b=bbfsTvKMfYdbKjqfeZveex30Zk5wh7GyQW3crtCCanWcgA0oK8dykYedxpGop+/9ZSMgte L/B3J761Iast3Z5fLkm6uc4pzycEnsMeVvNUSxVkZj2kkQMzzCd97R4ikDK9UzekBocxsQ U/k5UKmn8o/yJbW8QVQs3riLekyRx/Q= X-MC-Unique: GyhM3XL3O4WAvGegOaRuXQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/4] qemuMonitorJSONBlockStatsUpdateCapacityBlockdev: Use 'flat' mode of query-named-block-nodes Date: Wed, 9 Nov 2022 11:17:14 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1667989091265100001 Content-Type: text/plain; charset="utf-8" 'query-named-block-nodes' in non-flat mode returns redundantly nested data under the 'backing-image' field. Fortunately we don't need it when updating the capacity stats. This function was unfortunately not fixed originally when the support for flat mode was added. Use the flat cached in the monitor object to force flat mode if available. Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 8a3421a6fc..0e34cb55ad 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -2503,7 +2503,7 @@ qemuMonitorJSONBlockStatsUpdateCapacityBlockdev(qemuM= onitor *mon, { g_autoptr(virJSONValue) nodes =3D NULL; - if (!(nodes =3D qemuMonitorJSONQueryNamedBlockNodes(mon, false))) + if (!(nodes =3D qemuMonitorJSONQueryNamedBlockNodes(mon, mon->queryNam= edBlockNodesFlat))) return -1; if (virJSONValueArrayForeachSteal(nodes, --=20 2.37.3